diff --git a/senlinclient/v1/cluster.py b/senlinclient/v1/cluster.py index 42ad22ba..d612f256 100644 --- a/senlinclient/v1/cluster.py +++ b/senlinclient/v1/cluster.py @@ -148,12 +148,6 @@ class CreateCluster(command.ShowOne): def get_parser(self, prog_name): parser = super(CreateCluster, self).get_parser(prog_name) - parser.add_argument( - '--profile', - metavar='', - required=True, - help=_('Profile Id used for this cluster') - ) parser.add_argument( '--min-size', metavar='', @@ -187,6 +181,12 @@ class CreateCluster(command.ShowOne): 'key-value pairs separated by a semicolon.'), action='append' ) + parser.add_argument( + '--profile', + metavar='', + required=True, + help=_('Profile Id used for this cluster') + ) parser.add_argument( 'name', metavar='', @@ -521,12 +521,6 @@ class ClusterPolicyAttach(command.Command): def get_parser(self, prog_name): parser = super(ClusterPolicyAttach, self).get_parser(prog_name) - parser.add_argument( - '--policy', - metavar='', - required=True, - help=_('ID or name of policy to be attached') - ) parser.add_argument( '--enabled', default=True, @@ -534,6 +528,12 @@ class ClusterPolicyAttach(command.Command): help=_('Whether the policy should be enabled once attached. ' 'Default to True') ) + parser.add_argument( + '--policy', + metavar='', + required=True, + help=_('ID or name of policy to be attached') + ) parser.add_argument( 'cluster', metavar='', diff --git a/senlinclient/v1/node.py b/senlinclient/v1/node.py index 780bc6f0..6a5e158e 100644 --- a/senlinclient/v1/node.py +++ b/senlinclient/v1/node.py @@ -172,12 +172,6 @@ class CreateNode(command.ShowOne): def get_parser(self, prog_name): parser = super(CreateNode, self).get_parser(prog_name) - parser.add_argument( - '--profile', - metavar='', - required=True, - help=_('Profile Id or Name used for this node') - ) parser.add_argument( '--cluster', metavar='', @@ -196,6 +190,12 @@ class CreateNode(command.ShowOne): 'key-value pairs separated by a semicolon'), action='append' ) + parser.add_argument( + '--profile', + metavar='', + required=True, + help=_('Profile Id or Name used for this node') + ) parser.add_argument( 'name', metavar='', diff --git a/senlinclient/v1/profile.py b/senlinclient/v1/profile.py index 56b57d2e..db2500eb 100644 --- a/senlinclient/v1/profile.py +++ b/senlinclient/v1/profile.py @@ -212,12 +212,6 @@ class CreateProfile(command.ShowOne): def get_parser(self, prog_name): parser = super(CreateProfile, self).get_parser(prog_name) - parser.add_argument( - '--spec-file', - metavar='', - required=True, - help=_('The spec file used to create the profile') - ) parser.add_argument( '--metadata', metavar='', @@ -226,6 +220,12 @@ class CreateProfile(command.ShowOne): 'key-value pairs separated by a semicolon'), action='append' ) + parser.add_argument( + '--spec-file', + metavar='', + required=True, + help=_('The spec file used to create the profile') + ) parser.add_argument( 'name', metavar='', diff --git a/senlinclient/v1/receiver.py b/senlinclient/v1/receiver.py index c2ce9dd4..fda140be 100644 --- a/senlinclient/v1/receiver.py +++ b/senlinclient/v1/receiver.py @@ -159,6 +159,13 @@ class CreateReceiver(command.ShowOne): default='webhook', help=_('Type of the receiver to create') ) + parser.add_argument( + '--params', + metavar='', + help=_('A dictionary of parameters that will be passed to target ' + 'action when the receiver is triggered'), + action='append' + ) parser.add_argument( '--cluster', metavar='', @@ -171,13 +178,6 @@ class CreateReceiver(command.ShowOne): required=True, help=_('Name or ID of the targeted action to be triggered') ) - parser.add_argument( - '--params', - metavar='', - help=_('A dictionary of parameters that will be passed to target ' - 'action when the receiver is triggered'), - action='append' - ) parser.add_argument( 'name', metavar='',