trivial: Make better use of argparse
Change-Id: Ib76c0d18bf5e44bfb4dcd9d729d9a1c5635cdba7 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
a3410cd4f7
commit
2a2a6e1781
openstackclient
@ -173,6 +173,7 @@ class TestTypeCreate(TestType):
|
||||
self.new_volume_type.name,
|
||||
]
|
||||
verifylist = [
|
||||
('is_public', None),
|
||||
('project', self.project.id),
|
||||
('name', self.new_volume_type.name),
|
||||
]
|
||||
|
@ -250,11 +250,14 @@ class CreateVolumeType(command.ShowOne):
|
||||
raise exceptions.CommandError(msg)
|
||||
|
||||
kwargs = {}
|
||||
|
||||
if parsed_args.is_public is not None:
|
||||
kwargs['is_public'] = parsed_args.is_public
|
||||
|
||||
volume_type = volume_client.volume_types.create(
|
||||
parsed_args.name, description=parsed_args.description, **kwargs
|
||||
parsed_args.name,
|
||||
description=parsed_args.description,
|
||||
**kwargs,
|
||||
)
|
||||
volume_type._info.pop('extra_specs')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user