Hi stackers:

I have a problem about unification of timestamp related parameters in query 
fileds.


the related bug is:


https://bugs.launchpad.net/ceilometer/+bug/1295100


start_timestamp/end_timestamp and start/end and timestamp is not unified in 
query fields.


for examples:


the valid keys of alarm-history query fields are:
set(['start_timestamp', 'type', 'project', 'alarm_id', 'user', 
'start_timestamp_op', 'end_timestamp_op', 'end_timestamp'])


and, the valid keys of statistics query fields are:
(['end', 'start', 'metaquery', 'meter', 'project', 'source', 'user', 
'start_timestamp_op', 'resource', 'end_timestamp_op', 'message_id'])


and, the valid keys of sample-list query fields are:
(['end', 'start', 'metaquery', 'meter', 'project', 'source', 'user', 
'start_timestamp_op', 'resource', 'end_timestamp_op', 'message_id'])






Please pay attention to the 
method:ceilometer.api.controllers.v2:_query_to_kwargs()


In query field this method will transform 'timestamp' to 'end_timestamp' with 
the 'op' in ('lt', 'le'), and transform 'timestamp' to 'start_timestamp' with 
'op' in ('gt', 'ge'),
meanwhile, the start_timestamp_op and end_timestamp_op generated by 'op'.


So I think we should unitize the timestamp in query fields, an option is use 
'timestamp' with operators to instead others.


But the changes about API should be treated with caution, so I wish to obtain 
your opinion :)


before close these bugs, I want to get some advice:
https://bugs.launchpad.net/ceilometer/+bug/1270394
https://bugs.launchpad.net/ceilometer/+bug/1295104
https://bugs.launchpad.net/ceilometer/+bug/1291171




My Best


liu sheng

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to