summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorTerry Howe <terrylhowe@gmail.com>2014-04-22 09:08:52 -0600
committerTerry Howe <terrylhowe@gmail.com>2014-05-05 14:21:50 -0600
commit37231b5801162c9fcbd2a704a6660021dda6327d (patch)
tree26cb057f67d7f443d555fbe9bd3e969622d98eaf /openstackclient
parent8ec78a10f8ee35b607c4a7c0260de31178cdf5b0 (diff)
downloadpython-openstackclient-37231b5801162c9fcbd2a704a6660021dda6327d.tar.gz
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
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/volume/v1/type.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/openstackclient/volume/v1/type.py b/openstackclient/volume/v1/type.py
index edacb397..b199b7c3 100644
--- a/openstackclient/volume/v1/type.py
+++ b/openstackclient/volume/v1/type.py
@@ -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)