volume type create should display properties
The volume type create command should properly output the properties. The code was doing a create on the volume type and then setting the properties, but it was printing out the volume object from the create. Change-Id: I23c8a0182e77bb71903ad87c1b01ba2b62405f3b Closes-Bug: #1303978
This commit is contained in:
parent
8ec78a10f8
commit
37231b5801
@ -50,16 +50,11 @@ class CreateVolumeType(show.ShowOne):
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_type = volume_client.volume_types.create(
|
||||
parsed_args.name
|
||||
)
|
||||
volume_type = volume_client.volume_types.create(parsed_args.name)
|
||||
volume_type._info.pop('extra_specs')
|
||||
if parsed_args.property:
|
||||
volume_type.set_keys(parsed_args.property)
|
||||
# Map 'extra_specs' column to 'properties'
|
||||
volume_type._info.update(
|
||||
{'properties': utils.format_dict(
|
||||
volume_type._info.pop('extra_specs'))}
|
||||
)
|
||||
result = volume_type.set_keys(parsed_args.property)
|
||||
volume_type._info.update({'properties': utils.format_dict(result)})
|
||||
|
||||
info = {}
|
||||
info.update(volume_type._info)
|
||||
|
Loading…
x
Reference in New Issue
Block a user