summaryrefslogtreecommitdiff
path: root/ceilometerclient/v2/shell.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-08-09 12:46:45 +0000
committerGerrit Code Review <review@openstack.org>2013-08-09 12:46:45 +0000
commit9e330726ce6409088f7cbf50f4c76622c2f1732f (patch)
tree29fb4cb02f527cc8643504aa0f68f6bcaa245ebf /ceilometerclient/v2/shell.py
parent9e8a989b2a9e4e7780cc476ac754465c7e8b5a0e (diff)
parente8bf783d6aec35a694db491c8df580db54fa4de0 (diff)
downloadpython-ceilometerclient-1.0.3.tar.gz
Merge "Add support for new alarm repeat_actions attribute"1.0.3
Diffstat (limited to 'ceilometerclient/v2/shell.py')
-rw-r--r--ceilometerclient/v2/shell.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ceilometerclient/v2/shell.py b/ceilometerclient/v2/shell.py
index 1ea3e52..3659988 100644
--- a/ceilometerclient/v2/shell.py
+++ b/ceilometerclient/v2/shell.py
@@ -148,7 +148,7 @@ def _display_alarm(alarm):
'evaluation_periods', 'threshold', 'comparison_operator',
'state', 'enabled', 'alarm_id', 'user_id', 'project_id',
'alarm_actions', 'ok_actions', 'insufficient_data_actions',
- 'matching_metadata']
+ 'repeat_actions', 'matching_metadata']
data = dict([(f, getattr(alarm, f, '')) for f in fields])
utils.print_dict(data, wrap=72)
@@ -205,6 +205,10 @@ def do_alarm_show(cc, args={}):
metavar='<Webhook URL>', action='append', default=None,
help=('URL to invoke when state transitions to unkown. '
'May be used multiple times.'))
+@utils.arg('--repeat-actions', dest='repeat_actions', metavar='{True|False}',
+ type=utils.string_to_bool, default=False,
+ help=('True if actions should be repeatedly notified '
+ 'while alarm remains in target state'))
@utils.arg('--matching-metadata', dest='matching_metadata',
metavar='<Matching Metadata>', action='append', default=None,
help=('A meter should match this resource metadata (key=value) '
@@ -249,6 +253,10 @@ def do_alarm_create(cc, args={}):
metavar='<Webhook URL>', action='append', default=None,
help=('URL to invoke when state transitions to unkown. '
'May be used multiple times.'))
+@utils.arg('--repeat-actions', dest='repeat_actions',
+ metavar='{True|False}', type=utils.string_to_bool,
+ help=('True if actions should be repeatedly notified '
+ 'while alarm remains in target state'))
@utils.arg('--matching-metadata', dest='matching_metadata',
metavar='<Matching Metadata>', action='append', default=None,
help=('A meter should match this resource metadata (key=value) '