diff options
Diffstat (limited to 'cinderclient/v3/shell.py')
| -rw-r--r-- | cinderclient/v3/shell.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py index a78dfd1..da55f4a 100644 --- a/cinderclient/v3/shell.py +++ b/cinderclient/v3/shell.py @@ -964,19 +964,20 @@ def do_upload_to_image(cs, args): """Uploads volume to Image Service as an image.""" volume = utils.find_volume(cs, args.volume) if cs.api_version >= api_versions.APIVersion("3.1"): - shell_utils.print_volume_image( - volume.upload_to_image(args.force, - args.image_name, - args.container_format, - args.disk_format, - args.visibility, - args.protected)) + (resp, body) = volume.upload_to_image(args.force, + args.image_name, + args.container_format, + args.disk_format, + args.visibility, + args.protected) + + shell_utils.print_volume_image((resp, body)) else: - shell_utils.print_volume_image( - volume.upload_to_image(args.force, - args.image_name, - args.container_format, - args.disk_format)) + (resp, body) = volume.upload_to_image(args.force, + args.image_name, + args.container_format, + args.disk_format) + shell_utils.print_volume_image((resp, body)) @utils.arg('volume', metavar='<volume>', help='ID of volume to migrate.') |
