From ed4b2905cb3903fa469f90e881594a098c3bf035 Mon Sep 17 00:00:00 2001 From: jonnary Date: Wed, 26 Oct 2016 09:13:14 -0700 Subject: [PATCH] All dictionary options need be a string All dictionary options need be a string, otherwise only the first "key: value" valids. Change-Id: I17802a362b0e78f2d9a5a4930472704f76510fd6 --- senlinclient/v1/action.py | 2 +- senlinclient/v1/cluster.py | 6 +++--- senlinclient/v1/cluster_policy.py | 2 +- senlinclient/v1/event.py | 2 +- senlinclient/v1/node.py | 6 +++--- senlinclient/v1/policy.py | 2 +- senlinclient/v1/profile.py | 6 +++--- senlinclient/v1/receiver.py | 4 ++-- senlinclient/v1/shell.py | 32 +++++++++++++++---------------- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/senlinclient/v1/action.py b/senlinclient/v1/action.py index 9622b61d..1c4342d5 100644 --- a/senlinclient/v1/action.py +++ b/senlinclient/v1/action.py @@ -32,7 +32,7 @@ class ListAction(command.Lister): parser = super(ListAction, self).get_parser(prog_name) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned actions. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " diff --git a/senlinclient/v1/cluster.py b/senlinclient/v1/cluster.py index ed41b52f..b2b4bd98 100644 --- a/senlinclient/v1/cluster.py +++ b/senlinclient/v1/cluster.py @@ -38,7 +38,7 @@ class ListCluster(command.Lister): parser = super(ListCluster, self).get_parser(prog_name) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key=value...">', help=_("Filter parameters to apply on returned clusters. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter" @@ -178,7 +178,7 @@ class CreateCluster(command.ShowOne): ) parser.add_argument( '--metadata', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('Metadata values to be attached to the cluster. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -236,7 +236,7 @@ class UpdateCluster(command.ShowOne): ) parser.add_argument( '--metadata', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('Metadata values to be attached to the cluster. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon'), diff --git a/senlinclient/v1/cluster_policy.py b/senlinclient/v1/cluster_policy.py index 9e6c28e9..1b455b48 100644 --- a/senlinclient/v1/cluster_policy.py +++ b/senlinclient/v1/cluster_policy.py @@ -30,7 +30,7 @@ class ClusterPolicyList(command.Lister): parser = super(ClusterPolicyList, self).get_parser(prog_name) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned results. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " diff --git a/senlinclient/v1/event.py b/senlinclient/v1/event.py index d92be56e..3c1cc1c5 100644 --- a/senlinclient/v1/event.py +++ b/senlinclient/v1/event.py @@ -32,7 +32,7 @@ class ListEvent(command.Lister): parser = super(ListEvent, self).get_parser(prog_name) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned events. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " diff --git a/senlinclient/v1/node.py b/senlinclient/v1/node.py index 34895eeb..978a73eb 100644 --- a/senlinclient/v1/node.py +++ b/senlinclient/v1/node.py @@ -40,7 +40,7 @@ class ListNode(command.Lister): ) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned nodes. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter" @@ -184,7 +184,7 @@ class CreateNode(command.ShowOne): ) parser.add_argument( '--metadata', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('Metadata values to be attached to the node. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon'), @@ -243,7 +243,7 @@ class UpdateNode(command.ShowOne): ) parser.add_argument( '--metadata', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('Metadata values to be attached to the node. ' 'Metadata can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon'), diff --git a/senlinclient/v1/policy.py b/senlinclient/v1/policy.py index 107066db..32e029ca 100644 --- a/senlinclient/v1/policy.py +++ b/senlinclient/v1/policy.py @@ -54,7 +54,7 @@ class ListPolicy(command.Lister): ) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned policies. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " diff --git a/senlinclient/v1/profile.py b/senlinclient/v1/profile.py index 03aa43e4..ebda49f9 100644 --- a/senlinclient/v1/profile.py +++ b/senlinclient/v1/profile.py @@ -102,7 +102,7 @@ class ListProfile(command.Lister): ) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned profiles. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " @@ -215,7 +215,7 @@ class CreateProfile(command.ShowOne): parser = super(CreateProfile, self).get_parser(prog_name) parser.add_argument( '--metadata', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('Metadata values to be attached to the profile. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon'), @@ -277,7 +277,7 @@ class UpdateProfile(command.ShowOne): ) parser.add_argument( '--metadata', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('Metadata values to be attached to the profile. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon'), diff --git a/senlinclient/v1/receiver.py b/senlinclient/v1/receiver.py index 8c97b667..2af40c27 100644 --- a/senlinclient/v1/receiver.py +++ b/senlinclient/v1/receiver.py @@ -34,7 +34,7 @@ class ListReceiver(command.Lister): parser = super(ListReceiver, self).get_parser(prog_name) parser.add_argument( '--filters', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_("Filter parameters to apply on returned receivers. " "This can be specified multiple times, or once with " "parameters separated by a semicolon. The valid filter " @@ -162,7 +162,7 @@ class CreateReceiver(command.ShowOne): ) parser.add_argument( '--params', - metavar='', + metavar='<"key1=value1;key2=value2...">', help=_('A dictionary of parameters that will be passed to target ' 'action when the receiver is triggered'), action='append' diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index ed6c10e9..93d063df 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -83,7 +83,7 @@ def do_profile_type_show(service, args): # PROFILES -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned profiles. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -146,7 +146,7 @@ def _show_profile(service, profile_id): @utils.arg('-s', '--spec-file', metavar='', required=True, help=_('The spec file used to create the profile.')) -@utils.arg('-M', '--metadata', metavar='', +@utils.arg('-M', '--metadata', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Metadata values to be attached to the profile. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -192,7 +192,7 @@ def do_profile_show(service, args): @utils.arg('-n', '--name', metavar='', help=_('The new name for the profile.')) -@utils.arg('-M', '--metadata', metavar='', +@utils.arg('-M', '--metadata', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Metadata values to be attached to the profile. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -311,7 +311,7 @@ def do_policy_type_show(service, args): # POLICIES -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned policies. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -449,7 +449,7 @@ def do_policy_validate(service, args): # CLUSTERS -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned clusters. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -518,7 +518,7 @@ def _show_cluster(service, cluster_id): 'min_size is specified else 0.')) @utils.arg('-t', '--timeout', metavar='', type=int, help=_('Cluster creation timeout in seconds.')) -@utils.arg('-M', '--metadata', metavar='', +@utils.arg('-M', '--metadata', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Metadata values to be attached to the cluster. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -745,7 +745,7 @@ def do_cluster_run(service, args): help=_('ID or name of new profile to use.')) @utils.arg('-t', '--timeout', metavar='', help=_('New timeout (in seconds) value for the cluster.')) -@utils.arg('-M', '--metadata', metavar='', +@utils.arg('-M', '--metadata', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Metadata values to be attached to the cluster. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -777,7 +777,7 @@ def do_cluster_show(service, args): _show_cluster(service, args.id) -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned nodes. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -959,7 +959,7 @@ def do_cluster_scale_in(service, args): print('Request accepted by action %s' % resp['action']) -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned results. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -1086,7 +1086,7 @@ def do_cluster_recover(service, args): @utils.arg('-c', '--cluster', metavar='', help=_('ID or name of cluster from which nodes are to be listed.')) -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned nodes. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -1165,7 +1165,7 @@ def _show_node(service, node_id, show_details=False): help=_('Cluster Id for this node.')) @utils.arg('-r', '--role', metavar='', help=_('Role for this node in the specific cluster.')) -@utils.arg('-M', '--metadata', metavar='', +@utils.arg('-M', '--metadata', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Metadata values to be attached to the node. ' 'This can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -1221,7 +1221,7 @@ def do_node_delete(service, args): help=_('ID or name of new profile to use.')) @utils.arg('-r', '--role', metavar='', help=_('Role for this node in the specific cluster.')) -@utils.arg('-M', '--metadata', metavar='', +@utils.arg('-M', '--metadata', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Metadata values to be attached to the node. ' 'Metadata can be specified multiple times, or once with ' 'key-value pairs separated by a semicolon.'), @@ -1289,7 +1289,7 @@ def do_node_recover(service, args): # RECEIVERS -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned receivers. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -1367,7 +1367,7 @@ def do_receiver_show(service, args): @utils.arg('-a', '--action', metavar='', help=_('Name or ID of the targeted action to be triggered. ' 'Required if receiver type is webhook.')) -@utils.arg('-P', '--params', metavar='', +@utils.arg('-P', '--params', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('A dictionary of parameters that will be passed to target ' 'action when the receiver is triggered.'), action='append') @@ -1419,7 +1419,7 @@ def do_receiver_delete(service, args): # EVENTS -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned events. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'), @@ -1486,7 +1486,7 @@ def do_event_show(service, args): # ACTIONS -@utils.arg('-f', '--filters', metavar='', +@utils.arg('-f', '--filters', metavar='<"KEY1=VALUE1;KEY2=VALUE2...">', help=_('Filter parameters to apply on returned actions. ' 'This can be specified multiple times, or once with ' 'parameters separated by a semicolon.'),