Skip to content

Commit 7be79a2

Browse files
author
Rohit Jaiswal
committed
Update help message for alarm-gnocchi-resources-threshold-create
Help message for '--aggregation-method' in alarm-gnocchi-resources-threshold-create command is not precise. The problem is that 'avg' is not a valid aggregation method in gnocchi. This fix updates the help message. Change-Id: I513b6fb9db9f96bfdd10391b6acd5c95e278f601 Closes-Bug: #1506549
1 parent 49bb273 commit 7be79a2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ceilometerclient/v2/shell.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from oslo_serialization import jsonutils
2626
from oslo_utils import strutils
2727
import six
28+
from six import moves
2829

2930
from ceilometerclient.common import utils
3031
from ceilometerclient import exc
@@ -36,6 +37,11 @@
3637
ALARM_OPERATORS = ['lt', 'le', 'eq', 'ne', 'ge', 'gt']
3738
ALARM_COMBINATION_OPERATORS = ['and', 'or']
3839
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+
3945
AGGREGATES = {'avg': 'Avg',
4046
'count': 'Count',
4147
'max': 'Max',
@@ -509,7 +515,7 @@ def _wrapper(func):
509515
@utils.arg('--aggregation-method', metavar='<AGGREATION>',
510516
dest=rule_namespace + '/aggregation_method',
511517
help=('Aggregation method to use, one of: ' +
512-
str(STATISTICS) + '.'))
518+
str(GNOCCHI_AGGREGATION) + '.'))
513519
@utils.arg('--comparison-operator', metavar='<OPERATOR>',
514520
dest=rule_namespace + '/comparison_operator',
515521
help=('Operator to compare with, one of: ' +

0 commit comments

Comments
 (0)