diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2017-02-03 15:13:52 +0800 |
|---|---|---|
| committer | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2017-02-21 19:34:15 +0800 |
| commit | 1be6c2d92fd83d9ba4a6813aa409cc888c0ce8fe (patch) | |
| tree | 1ce0730e4bdb5d12d54d83c1d3d1801978a56feb /openstackclient/volume | |
| parent | bc4a3f467facecdb690f3bdbad3a6bbef1996778 (diff) | |
| download | python-openstackclient-1be6c2d92fd83d9ba4a6813aa409cc888c0ce8fe.tar.gz | |
Fix properties format for volume qos in volume v1
Notice that patch [1] fixed the error of properties
format for volume qos in volume v2, but there is the
same bug in volume v1, and the patch missed that, so
fix the problem in v1 as well
[1] https://review.openstack.org/#/c/421065/
Partial-Bug: #1656767
Change-Id: I156bf13d164dbd0d0a7ce394964176718c4ff0e5
Diffstat (limited to 'openstackclient/volume')
| -rw-r--r-- | openstackclient/volume/v1/qos_specs.py | 11 |
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))) |
