summaryrefslogtreecommitdiff
path: root/ceilometerclient/v2/statistics.py
diff options
context:
space:
mode:
Diffstat (limited to 'ceilometerclient/v2/statistics.py')
-rw-r--r--ceilometerclient/v2/statistics.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/ceilometerclient/v2/statistics.py b/ceilometerclient/v2/statistics.py
index 689992c..d0b56c9 100644
--- a/ceilometerclient/v2/statistics.py
+++ b/ceilometerclient/v2/statistics.py
@@ -26,13 +26,19 @@ class StatisticsManager(base.Manager):
def _build_aggregates(self, aggregates):
url_aggregates = []
for aggregate in aggregates:
- url_aggregates.append(
- "aggregate.func=%(func)s" % aggregate
- )
if 'param' in aggregate:
- url_aggregates.append(
+ url_aggregates.insert(
+ 0,
"aggregate.param=%(param)s" % aggregate
)
+ url_aggregates.insert(
+ 0,
+ "aggregate.func=%(func)s" % aggregate
+ )
+ else:
+ url_aggregates.append(
+ "aggregate.func=%(func)s" % aggregate
+ )
return url_aggregates
def list(self, meter_name, q=None, period=None, groupby=[], aggregates=[]):