volume: Volume names are optional
Who knew? Change-Id: I1c1a811c0db59250e8a20a87f25c2662bc3ab3e8 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
c6065c7a47
commit
3fc585332f
@ -108,11 +108,9 @@ class TestVolumeCreate(TestVolume):
|
||||
def test_volume_create_min_options(self):
|
||||
arglist = [
|
||||
'--size', str(self.new_volume.size),
|
||||
self.new_volume.name,
|
||||
]
|
||||
verifylist = [
|
||||
('size', self.new_volume.size),
|
||||
('name', self.new_volume.name),
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
@ -124,7 +122,7 @@ class TestVolumeCreate(TestVolume):
|
||||
self.volumes_mock.create.assert_called_with(
|
||||
size=self.new_volume.size,
|
||||
snapshot_id=None,
|
||||
name=self.new_volume.name,
|
||||
name=None,
|
||||
description=None,
|
||||
volume_type=None,
|
||||
availability_zone=None,
|
||||
|
@ -82,10 +82,11 @@ class CreateVolume(command.ShowOne):
|
||||
_description = _("Create new volume")
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(CreateVolume, self).get_parser(prog_name)
|
||||
parser = super().get_parser(prog_name)
|
||||
parser.add_argument(
|
||||
"name",
|
||||
metavar="<name>",
|
||||
nargs="?",
|
||||
help=_("Volume name"),
|
||||
)
|
||||
parser.add_argument(
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``<name>`` argument for the ``volume create`` command is now optional.
|
Loading…
Reference in New Issue
Block a user