Merge "Remove group_by statement in metric queries"

This commit is contained in:
Jenkins 2016-09-16 08:23:51 +00:00 committed by Gerrit Code Review
commit fc36a7a698

View File

@ -144,17 +144,17 @@ class CeilometerHelper(object):
:return:
"""
end_time = datetime.datetime.utcnow()
start_time = (datetime.datetime.utcnow() -
datetime.timedelta(seconds=int(period)))
query = self.build_query(
resource_id=resource_id, start_time=start_time)
resource_id=resource_id, start_time=start_time, end_time=end_time)
statistic = self.query_retry(f=self.ceilometer.statistics.list,
meter_name=meter_name,
q=query,
period=period,
aggregates=[
{'func': aggregate}],
groupby=['resource_id'])
{'func': aggregate}])
item_value = None
if statistic: