Merge "trivial: Make better use of argparse"
This commit is contained in:
commit
dfcb8b0ee7
@ -171,6 +171,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…
Reference in New Issue
Block a user