Fix for statistic_aggregation

This patch set fixes aggregate parameter for statistic_aggregation
function so we may use it with any aggregate function.

Change-Id: If586d656aadd3d098a1610a97a2f315e70351de5
Closes-Bug: #1583610
This commit is contained in:
Alexander Chadin
2016-05-19 16:41:07 +03:00
parent f6f5079adb
commit fb82131d85

View File

@@ -123,7 +123,7 @@ class CeilometerHelper(object):
item_value = None
if statistic:
item_value = statistic[-1]._info.get('aggregate').get('avg')
item_value = statistic[-1]._info.get('aggregate').get(aggregate)
return item_value
def get_last_sample_values(self, resource_id, meter_name, limit=1):