|
25 | 25 | from oslo_serialization import jsonutils
|
26 | 26 | from oslo_utils import strutils
|
27 | 27 | import six
|
| 28 | +from six import moves |
28 | 29 |
|
29 | 30 | from ceilometerclient.common import utils
|
30 | 31 | from ceilometerclient import exc
|
|
36 | 37 | ALARM_OPERATORS = ['lt', 'le', 'eq', 'ne', 'ge', 'gt']
|
37 | 38 | ALARM_COMBINATION_OPERATORS = ['and', 'or']
|
38 | 39 | STATISTICS = ['max', 'min', 'avg', 'sum', 'count']
|
| 40 | +GNOCCHI_AGGREGATION = ['last', 'min', 'median', 'sum', |
| 41 | + 'std', 'first', 'mean', 'count', |
| 42 | + 'moving-average', 'max'] |
| 43 | +GNOCCHI_AGGREGATION.extend(['%spct' % num for num in moves.xrange(1, 100)]) |
| 44 | + |
39 | 45 | AGGREGATES = {'avg': 'Avg',
|
40 | 46 | 'count': 'Count',
|
41 | 47 | 'max': 'Max',
|
@@ -509,7 +515,7 @@ def _wrapper(func):
|
509 | 515 | @utils.arg('--aggregation-method', metavar='<AGGREATION>',
|
510 | 516 | dest=rule_namespace + '/aggregation_method',
|
511 | 517 | help=('Aggregation method to use, one of: ' +
|
512 |
| - str(STATISTICS) + '.')) |
| 518 | + str(GNOCCHI_AGGREGATION) + '.')) |
513 | 519 | @utils.arg('--comparison-operator', metavar='<OPERATOR>',
|
514 | 520 | dest=rule_namespace + '/comparison_operator',
|
515 | 521 | help=('Operator to compare with, one of: ' +
|
|
0 commit comments