Now `name` is a positional argument in cluster creation
Now `name` is a positional argument in cluster creation and cluster template creation of OSC command Change-Id: I3819381d97cda7b75c7cf90265335c38aca3ad54 Partially-Implements: blueprint deprecate-magnum-client
This commit is contained in:
parent
f501b618fb
commit
e9f17af05c
|
@ -71,7 +71,7 @@ class CreateClusterTemplate(command.ShowOne):
|
|||
parser = super(CreateClusterTemplate, self).get_parser(prog_name)
|
||||
|
||||
parser.add_argument(
|
||||
'--name',
|
||||
'name',
|
||||
metavar='<name>',
|
||||
help=_('Name of the cluster template to create.'))
|
||||
parser.add_argument(
|
||||
|
|
|
@ -78,7 +78,7 @@ class CreateCluster(command.Command):
|
|||
default=1,
|
||||
metavar='<master-count>',
|
||||
help='The number of master nodes for the cluster.')
|
||||
parser.add_argument('--name',
|
||||
parser.add_argument('name',
|
||||
metavar='<name>',
|
||||
help='Name of the cluster to create.')
|
||||
parser.add_argument('--node-count',
|
||||
|
|
|
@ -91,7 +91,7 @@ class TestClusterTemplateCreate(TestClusterTemplate):
|
|||
'--coe', self.new_ct.coe,
|
||||
'--external-network', self.new_ct.external_network_id,
|
||||
'--image', self.new_ct.image_id,
|
||||
'--name', self.new_ct.name
|
||||
self.new_ct.name
|
||||
]
|
||||
verifylist = [
|
||||
('coe', self.new_ct.coe),
|
||||
|
@ -109,13 +109,11 @@ class TestClusterTemplateCreate(TestClusterTemplate):
|
|||
|
||||
arglist = [
|
||||
'--external-network', self.new_ct.external_network_id,
|
||||
'--image', self.new_ct.image_id,
|
||||
'--name', self.new_ct.name
|
||||
'--image', self.new_ct.image_id
|
||||
]
|
||||
verifylist = [
|
||||
('external_network', self.new_ct.external_network_id),
|
||||
('image', self.new_ct.image_id),
|
||||
('name', self.new_ct.name)
|
||||
('image', self.new_ct.image_id)
|
||||
]
|
||||
self.assertRaises(magnum_fakes.MagnumParseException,
|
||||
self.check_parser, self.cmd, arglist, verifylist)
|
||||
|
|
|
@ -45,7 +45,7 @@ class TestClusterCreate(TestCluster):
|
|||
'docker_volume_size': None,
|
||||
'keypair': None,
|
||||
'master_count': 1,
|
||||
'name': None,
|
||||
'name': 'fake-cluster-1',
|
||||
'node_count': 1
|
||||
}
|
||||
|
||||
|
@ -68,10 +68,12 @@ class TestClusterCreate(TestCluster):
|
|||
"""Verifies required arguments."""
|
||||
|
||||
arglist = [
|
||||
'--cluster-template', self._cluster.cluster_template_id
|
||||
'--cluster-template', self._cluster.cluster_template_id,
|
||||
self._cluster.name
|
||||
]
|
||||
verifylist = [
|
||||
('cluster_template', self._cluster.cluster_template_id)
|
||||
('cluster_template', self._cluster.cluster_template_id),
|
||||
('name', self._cluster.name)
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
@ -81,7 +83,7 @@ class TestClusterCreate(TestCluster):
|
|||
"""Verifies missing required arguments."""
|
||||
|
||||
arglist = [
|
||||
'--name', self._cluster.name
|
||||
self._cluster.name
|
||||
]
|
||||
verifylist = [
|
||||
('name', self._cluster.name)
|
||||
|
|
Loading…
Reference in New Issue