From 5ecaf95d0ef93d40a35f01ba22544628c09146c3 Mon Sep 17 00:00:00 2001 From: cindy oneill Date: Tue, 12 Aug 2014 14:56:32 -0600 Subject: [PATCH] help for dimensions mentions need for quoting Change-Id: I92867da65d5e4dee1bad6a177bf06ec49c850447 --- monascaclient/v2_0/shell.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/monascaclient/v2_0/shell.py b/monascaclient/v2_0/shell.py index 7660985..f773def 100644 --- a/monascaclient/v2_0/shell.py +++ b/monascaclient/v2_0/shell.py @@ -35,7 +35,9 @@ notification_types = ['EMAIL', 'SMS'] @utils.arg('--dimensions', metavar='', help='key value pair used to create a metric dimension. ' 'This can be specified multiple times, or once with parameters ' - 'separated by a comma.', + 'separated by a comma. ' + 'Dimensions need quoting when they contain special chars [&,(,),{,},>,<] ' + 'that confuse the CLI parser.', action='append') @utils.arg('--time', metavar='', default=time.time(), type=int, @@ -83,7 +85,9 @@ def do_metric_create_raw(mc, args): @utils.arg('--dimensions', metavar='', help='key value pair used to specify a metric dimension. ' 'This can be specified multiple times, or once with parameters ' - 'separated by a comma.', + 'separated by a comma. ' + 'Dimensions need quoting when they contain special chars [&,(,),{,},>,<] ' + 'that confuse the CLI parser.', action='append') def do_metric_list(mc, args): '''List metrics for this tenant.''' @@ -179,7 +183,9 @@ def format_statistic_value(statistics, columns, stat_type): @utils.arg('--dimensions', metavar='', help='key value pair used to specify a metric dimension. ' 'This can be specified multiple times, or once with parameters ' - 'separated by a comma.', + 'separated by a comma. ' + 'Dimensions need quoting when they contain special chars [&,(,),{,},>,<] ' + 'that confuse the CLI parser.', action='append') @utils.arg('starttime', metavar='', help='measurements >= UTC time. format: 2014-01-01T00:00:00Z.') @@ -234,7 +240,9 @@ def do_measurement_list(mc, args): @utils.arg('--dimensions', metavar='', help='key value pair used to specify a metric dimension. ' 'This can be specified multiple times, or once with parameters ' - 'separated by a comma.', + 'separated by a comma. ' + 'Dimensions need quoting when they contain special chars [&,(,),{,},>,<] ' + 'that confuse the CLI parser.', action='append') @utils.arg('starttime', metavar='', help='measurements >= UTC time. format: 2014-01-01T00:00:00Z.') @@ -449,7 +457,7 @@ def do_notification_update(mc, args): @utils.arg('--description', metavar='', help='Description of the alarm.') @utils.arg('expression', metavar='', - help='The alarm expression to evaluate. No spaces.') + help='The alarm expression to evaluate. Quoted.') @utils.arg('--severity', metavar='', help='Severity is one of [LOW, MEDIUM, HIGH, CRITICAL].') @utils.arg('--alarm-actions', metavar='', @@ -533,7 +541,9 @@ def do_alarm_show(mc, args): @utils.arg('--dimensions', metavar='', help='key value pair used to specify a metric dimension. ' 'This can be specified multiple times, or once with parameters ' - 'separated by a comma.', + 'separated by a comma. ' + 'Dimensions need quoting when they contain special chars [&,(,),{,},>,<] ' + 'that confuse the CLI parser.', action='append') @utils.arg('--state', metavar='', help='STATE is one of [UNDETERMINED, OK, ALARM].') @@ -602,7 +612,7 @@ def do_alarm_delete(mc, args): @utils.arg('--description', metavar='', help='Description of the alarm.') @utils.arg('expression', metavar='', - help='The alarm expression to evaluate. No spaces.') + help='The alarm expression to evaluate. Quoted.') @utils.arg('--alarm-actions', metavar='', help='The notification method to use when an alarm state is ALARM. ' 'This param may be specified multiple times.', @@ -673,7 +683,7 @@ def do_alarm_update(mc, args): @utils.arg('--description', metavar='', help='Description of the alarm.') @utils.arg('--expression', metavar='', - help='The alarm expression to evaluate. No spaces.') + help='The alarm expression to evaluate. Quoted.') @utils.arg('--alarm-actions', metavar='', help='The notification method to use when an alarm state is ALARM. ' 'This param may be specified multiple times.', @@ -778,7 +788,9 @@ def do_alarm_history(mc, args): @utils.arg('--dimensions', metavar='', help='key value pair used to specify a metric dimension. ' 'This can be specified multiple times, or once with parameters ' - 'separated by a comma.', + 'separated by a comma. ' + 'Dimensions need quoting when they contain special chars [&,(,),{,},>,<] ' + 'that confuse the CLI parser.', action='append') @utils.arg('--starttime', metavar='', help='measurements >= UTC time. format: 2014-01-01T00:00:00Z.')