first & last sample timestamps not included in the Resource representation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Medium
|
Eoghan Glynn | ||
Havana |
Fix Released
|
Medium
|
Eoghan Glynn |
Bug Description
The first & last sample timestamps for any meter associated with a resource are calculated when we retrieve the Resource models from the storage driver, via logic added in this commit:
https:/
However due to a mismatch between the Resource model and the Resource representation returned by the API, these fist & last timestamps are simply discarded ... i.e. are not returned from the GET /v2/resources API call.
Since it doesn't make sense to incur the cost of calculating these timestamps without exposing them, seems we need a change such as the following to line up the two Resource classes:
diff --git a/ceilometer/
index 0e03ea5..5dba9d4 100644
--- a/ceilometer/
+++ b/ceilometer/
@@ -982,8 +982,11 @@ class Resource(_Base):
user_id = wtypes.text
"The ID of the user who created the resource or updated it last"
- timestamp = datetime.datetime
- "UTC date and time of the last update to any meter for the resource"
+ first_sample_
+ "UTC date & time of the first sample for any meter associated with the resource"
+
+ last_sample_
+ "UTC date & time of the last sample for any meter associated with the resource"
metadata = {wtypes.text: wtypes.text}
"Arbitrary metadata associated with the resource"
Changed in ceilometer: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in ceilometer: | |
assignee: | nobody → lizheming (lizheming-li) |
Changed in ceilometer: | |
status: | Triaged → In Progress |
tags: | added: havana-backport-potential |
Changed in ceilometer: | |
milestone: | none → icehouse-2 |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | icehouse-2 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/65118
Review: https:/