Merge "Fix errors for "volume type unset" command"

This commit is contained in:
Jenkins 2016-06-07 01:31:50 +00:00 committed by Gerrit Code Review
commit dd0fe3d94e
3 changed files with 6 additions and 3 deletions

View File

@ -150,7 +150,7 @@ Unset volume type properties
.. code:: bash
os volume type unset
[--property <key>]
[--property <key> [...] ]
[--project <project>]
[--project-domain <project-domain>]
<volume-type>

View File

@ -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):

View File

@ -256,6 +256,7 @@ class UnsetVolumeType(command.Command):
parser.add_argument(
'--property',
metavar='<key>',
action='append',
help=_('Remove a property from this volume type '
'(repeat option to remove multiple properties)'),
)