diff options
author | deepak_mourya <deepak.mourya@nectechnologies.in> | 2018-05-28 09:38:34 +0530 |
---|---|---|
committer | deepak_mourya <deepak.mourya@nectechnologies.in> | 2018-05-28 10:02:19 +0530 |
commit | a5d5ab5a21dc9bada4bc929c9ec021d4bb9952cf (patch) | |
tree | e79270a4e7d91a30da555c31e65c710a6b8cfcce | |
parent | 3f6aa2a64835c9984b744d9f9f9127fabb9cdd59 (diff) | |
download | python-cinderclient-a5d5ab5a21dc9bada4bc929c9ec021d4bb9952cf.tar.gz |
Unreadable output of upload-to-image.
The output of upload-to-image is not readable due to
volume type is printed in output as a whole.
Printing volume type name only cleans up the output.
Change-Id: Ia588cf7ccc0873a8cf956c551afcccf4b6ddaa39
Closes-Bug: #1557486
-rw-r--r-- | cinderclient/shell_utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cinderclient/shell_utils.py b/cinderclient/shell_utils.py index 995f216..451552e 100644 --- a/cinderclient/shell_utils.py +++ b/cinderclient/shell_utils.py @@ -27,6 +27,10 @@ _quota_infos = ['Type', 'In_use', 'Reserved', 'Limit', 'Allocated'] def print_volume_image(image): + if 'volume_type' in image[1]['os-volume_upload_image']: + volume_type_name = ( + image[1]['os-volume_upload_image']['volume_type']['name']) + image[1]['os-volume_upload_image']['volume_type'] = volume_type_name utils.print_dict(image[1]['os-volume_upload_image']) |