diff options
author | Rohit Jaiswal <rohit.jaiswal@hp.com> | 2015-10-26 18:52:36 +0000 |
---|---|---|
committer | Rohit Jaiswal <rohit.jaiswal@hp.com> | 2015-10-28 14:07:56 +0000 |
commit | 7be79a22f151c35b86e747d3eb9af78f0fbea06b (patch) | |
tree | 84950500f78dac0ca8184620ff5c3b29d519df94 | |
parent | 49bb273859d637d5565d8f954cacd1b3494cde08 (diff) | |
download | python-ceilometerclient-7be79a22f151c35b86e747d3eb9af78f0fbea06b.tar.gz |
Update help message for alarm-gnocchi-resources-threshold-create2.0.0
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
-rw-r--r-- | ceilometerclient/v2/shell.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ceilometerclient/v2/shell.py b/ceilometerclient/v2/shell.py index 3bddeac..b5eb0c3 100644 --- a/ceilometerclient/v2/shell.py +++ b/ceilometerclient/v2/shell.py @@ -25,6 +25,7 @@ import json from oslo_serialization import jsonutils from oslo_utils import strutils import six +from six import moves from ceilometerclient.common import utils from ceilometerclient import exc @@ -36,6 +37,11 @@ ALARM_SEVERITY = ['low', 'moderate', 'critical'] ALARM_OPERATORS = ['lt', 'le', 'eq', 'ne', 'ge', 'gt'] ALARM_COMBINATION_OPERATORS = ['and', 'or'] STATISTICS = ['max', 'min', 'avg', 'sum', 'count'] +GNOCCHI_AGGREGATION = ['last', 'min', 'median', 'sum', + 'std', 'first', 'mean', 'count', + 'moving-average', 'max'] +GNOCCHI_AGGREGATION.extend(['%spct' % num for num in moves.xrange(1, 100)]) + AGGREGATES = {'avg': 'Avg', 'count': 'Count', 'max': 'Max', @@ -509,7 +515,7 @@ def common_alarm_gnocchi_arguments(rule_namespace, create=False): @utils.arg('--aggregation-method', metavar='<AGGREATION>', dest=rule_namespace + '/aggregation_method', help=('Aggregation method to use, one of: ' + - str(STATISTICS) + '.')) + str(GNOCCHI_AGGREGATION) + '.')) @utils.arg('--comparison-operator', metavar='<OPERATOR>', dest=rule_namespace + '/comparison_operator', help=('Operator to compare with, one of: ' + |