Skip to content

Commit 37231b5

Browse files
committed
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
1 parent 8ec78a1 commit 37231b5

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

‎openstackclient/volume/v1/type.py‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,11 @@ def get_parser(self, prog_name):
5050
def take_action(self, parsed_args):
5151
self.log.debug('take_action(%s)' % parsed_args)
5252
volume_client = self.app.client_manager.volume
53-
volume_type = volume_client.volume_types.create(
54-
parsed_args.name
55-
)
53+
volume_type = volume_client.volume_types.create(parsed_args.name)
54+
volume_type._info.pop('extra_specs')
5655
if parsed_args.property:
57-
volume_type.set_keys(parsed_args.property)
58-
# Map 'extra_specs' column to 'properties'
59-
volume_type._info.update(
60-
{'properties': utils.format_dict(
61-
volume_type._info.pop('extra_specs'))}
62-
)
56+
result = volume_type.set_keys(parsed_args.property)
57+
volume_type._info.update({'properties': utils.format_dict(result)})
6358

6459
info = {}
6560
info.update(volume_type._info)

0 commit comments

Comments
 (0)