summaryrefslogtreecommitdiff
path: root/openstackclient/volume
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-02-21 19:49:16 +0000
committerGerrit Code Review <review@openstack.org>2017-02-21 19:49:16 +0000
commit62938c02e077049e3e4ebb393045ba0fa783c72d (patch)
tree7184d35a66e137102b700044fb0813955614cbdc /openstackclient/volume
parent7bf68577e6e66a540a05bd8153a3675706ec282d (diff)
parent1be6c2d92fd83d9ba4a6813aa409cc888c0ce8fe (diff)
downloadpython-openstackclient-62938c02e077049e3e4ebb393045ba0fa783c72d.tar.gz
Merge "Fix properties format for volume qos in volume v1"
Diffstat (limited to 'openstackclient/volume')
-rw-r--r--openstackclient/volume/v1/qos_specs.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/openstackclient/volume/v1/qos_specs.py b/openstackclient/volume/v1/qos_specs.py
index b824b351..bae8c1ab 100644
--- a/openstackclient/volume/v1/qos_specs.py
+++ b/openstackclient/volume/v1/qos_specs.py
@@ -94,7 +94,9 @@ class CreateQos(command.ShowOne):
specs.update(parsed_args.property)
qos_spec = volume_client.qos_specs.create(parsed_args.name, specs)
-
+ qos_spec._info.update(
+ {'properties': utils.format_dict(qos_spec._info.pop('specs'))}
+ )
return zip(*sorted(six.iteritems(qos_spec._info)))
@@ -190,8 +192,10 @@ class ListQos(command.Lister):
for association in qos_associations]
qos._info.update({'associations': associations})
+ display_columns = (
+ 'ID', 'Name', 'Consumer', 'Associations', 'Properties')
columns = ('ID', 'Name', 'Consumer', 'Associations', 'Specs')
- return (columns,
+ return (display_columns,
(utils.get_dict_properties(
s._info, columns,
formatters={
@@ -254,7 +258,8 @@ class ShowQos(command.ShowOne):
qos_spec._info.update({
'associations': utils.format_list(associations)
})
- qos_spec._info.update({'specs': utils.format_dict(qos_spec.specs)})
+ qos_spec._info.update(
+ {'properties': utils.format_dict(qos_spec._info.pop('specs'))})
return zip(*sorted(six.iteritems(qos_spec._info)))