diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-01-21 06:18:08 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-01-21 06:18:08 +0000 |
| commit | bf3f12f5969dff262077c83bdbfa6d934aa43648 (patch) | |
| tree | fdc6922f03f221bd5b736d53c7c1038fe785d09a /openstackclient/volume | |
| parent | 89d9449dcfd4679e8d786c73df4be67af8e3b04a (diff) | |
| parent | f353253122ca39aeb092656cea011a06e70103a4 (diff) | |
| download | python-openstackclient-bf3f12f5969dff262077c83bdbfa6d934aa43648.tar.gz | |
Merge "Error in the return of command 'volume qos create'"
Diffstat (limited to 'openstackclient/volume')
| -rw-r--r-- | openstackclient/volume/v2/qos_specs.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/openstackclient/volume/v2/qos_specs.py b/openstackclient/volume/v2/qos_specs.py index b7f49eca..8e1d67b5 100644 --- a/openstackclient/volume/v2/qos_specs.py +++ b/openstackclient/volume/v2/qos_specs.py @@ -95,6 +95,9 @@ class CreateQos(command.ShowOne): 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 +193,11 @@ 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 +260,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))) |
