diff --git a/doc/source/command-objects/volume-type.rst b/doc/source/command-objects/volume-type.rst index b7aea63262..50acf9fa65 100644 --- a/doc/source/command-objects/volume-type.rst +++ b/doc/source/command-objects/volume-type.rst @@ -150,7 +150,7 @@ Unset volume type properties .. code:: bash os volume type unset - [--property ] + [--property [...] ] [--project ] [--project-domain ] diff --git a/openstackclient/tests/volume/v2/test_type.py b/openstackclient/tests/volume/v2/test_type.py index 872b4ae936..10c386129d 100644 --- a/openstackclient/tests/volume/v2/test_type.py +++ b/openstackclient/tests/volume/v2/test_type.py @@ -397,17 +397,19 @@ class TestTypeUnset(TestType): def test_type_unset(self): arglist = [ '--property', 'property', + '--property', 'multi_property', self.volume_type.id, ] verifylist = [ - ('property', 'property'), + ('property', ['property', 'multi_property']), ('volume_type', self.volume_type.id), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) result = self.cmd.take_action(parsed_args) - self.volume_type.unset_keys.assert_called_once_with('property') + self.volume_type.unset_keys.assert_called_once_with( + ['property', 'multi_property']) self.assertIsNone(result) def test_type_unset_project_access(self): diff --git a/openstackclient/volume/v2/volume_type.py b/openstackclient/volume/v2/volume_type.py index e44e39ff1e..9aed17bc79 100644 --- a/openstackclient/volume/v2/volume_type.py +++ b/openstackclient/volume/v2/volume_type.py @@ -256,6 +256,7 @@ class UnsetVolumeType(command.Command): parser.add_argument( '--property', metavar='', + action='append', help=_('Remove a property from this volume type ' '(repeat option to remove multiple properties)'), )