Reorder required parameters
This patch put required parameters to an visible position. Change-Id: Ib68ab28c8f616d912b81ee38ec6325e087f6c648
This commit is contained in:
parent
bd41eb4c9d
commit
a619b79c3b
senlinclient/v1
@ -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='<profile>',
|
||||
required=True,
|
||||
help=_('Profile Id used for this cluster')
|
||||
)
|
||||
parser.add_argument(
|
||||
'--min-size',
|
||||
metavar='<min-size>',
|
||||
@ -187,6 +181,12 @@ class CreateCluster(command.ShowOne):
|
||||
'key-value pairs separated by a semicolon.'),
|
||||
action='append'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--profile',
|
||||
metavar='<profile>',
|
||||
required=True,
|
||||
help=_('Profile Id used for this cluster')
|
||||
)
|
||||
parser.add_argument(
|
||||
'name',
|
||||
metavar='<cluster-name>',
|
||||
@ -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='<policy>',
|
||||
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='<policy>',
|
||||
required=True,
|
||||
help=_('ID or name of policy to be attached')
|
||||
)
|
||||
parser.add_argument(
|
||||
'cluster',
|
||||
metavar='<cluster>',
|
||||
|
@ -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='<profile>',
|
||||
required=True,
|
||||
help=_('Profile Id or Name used for this node')
|
||||
)
|
||||
parser.add_argument(
|
||||
'--cluster',
|
||||
metavar='<cluster>',
|
||||
@ -196,6 +190,12 @@ class CreateNode(command.ShowOne):
|
||||
'key-value pairs separated by a semicolon'),
|
||||
action='append'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--profile',
|
||||
metavar='<profile>',
|
||||
required=True,
|
||||
help=_('Profile Id or Name used for this node')
|
||||
)
|
||||
parser.add_argument(
|
||||
'name',
|
||||
metavar='<node-name>',
|
||||
|
@ -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='<spec-file>',
|
||||
required=True,
|
||||
help=_('The spec file used to create the profile')
|
||||
)
|
||||
parser.add_argument(
|
||||
'--metadata',
|
||||
metavar='<key1=value1;key2=value2...>',
|
||||
@ -226,6 +220,12 @@ class CreateProfile(command.ShowOne):
|
||||
'key-value pairs separated by a semicolon'),
|
||||
action='append'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--spec-file',
|
||||
metavar='<spec-file>',
|
||||
required=True,
|
||||
help=_('The spec file used to create the profile')
|
||||
)
|
||||
parser.add_argument(
|
||||
'name',
|
||||
metavar='<profile-name>',
|
||||
|
@ -159,6 +159,13 @@ class CreateReceiver(command.ShowOne):
|
||||
default='webhook',
|
||||
help=_('Type of the receiver to create')
|
||||
)
|
||||
parser.add_argument(
|
||||
'--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'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--cluster',
|
||||
metavar='<cluster>',
|
||||
@ -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='<key1=value1;key2=value2...>',
|
||||
help=_('A dictionary of parameters that will be passed to target '
|
||||
'action when the receiver is triggered'),
|
||||
action='append'
|
||||
)
|
||||
parser.add_argument(
|
||||
'name',
|
||||
metavar='<name>',
|
||||
|
Loading…
x
Reference in New Issue
Block a user