From 45a9cab6534a84a2e7c3f97f5ee965892473ec00 Mon Sep 17 00:00:00 2001 From: Richard Theis Date: Mon, 7 Mar 2016 13:27:35 -0600 Subject: [PATCH] Consistent resource.prop for timestamps and booleans (metric) This patch set updates all metric objects to use consistent resource.prop for timestamps and booleans. In particular, the following changes were made: - Clarify documentation for timestamp and boolean attributes Change-Id: Icd5b55eb072dc68935b5378db7ec0965f3b06e73 Partial-Bug: #1544584 --- openstack/metric/v1/resource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openstack/metric/v1/resource.py b/openstack/metric/v1/resource.py index 26ba69a2a..13dc49eb7 100644 --- a/openstack/metric/v1/resource.py +++ b/openstack/metric/v1/resource.py @@ -37,9 +37,11 @@ class Generic(resource.Resource): #: The ID of the project project_id = resource.prop('project_id') #: Timestamp when this resource was started + #: *Type: datetime object parsed from ISO 8601 formatted string* started_at = resource.prop('started_at', type=format.ISO8601) #: Timestamp when this resource was ended + #: *Type: datetime object parsed from ISO 8601 formatted string* ended_at = resource.prop('ended_at', type=format.ISO8601) #: A dictionary of metrics collected on this resource