summaryrefslogtreecommitdiff
path: root/openstackclient/image/v1
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2015-09-24 12:00:39 -0400
committerSteve Martinelli <stevemar@ca.ibm.com>2015-10-06 20:14:54 +0000
commit2bd82ab89258110b44135ae4cf2c4678938673d2 (patch)
treeb5f795ac145622aa0752091f077738e77759a9d6 /openstackclient/image/v1
parent1afb57453387f9f81d755f23d75d583b732e2d12 (diff)
downloadpython-openstackclient-2bd82ab89258110b44135ae4cf2c4678938673d2.tar.gz
image set should not show the resource
the rest of OSC set commands do not show the resource after it has been updated. unless the update fails then we report back a failure, otherwise the user should assume everything went fine. Change-Id: I2bd4188450c3853b4a1bc25f80fc9450cda32bdd
Diffstat (limited to 'openstackclient/image/v1')
-rw-r--r--openstackclient/image/v1/image.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py
index 68c81cd5..23f57136 100644
--- a/openstackclient/image/v1/image.py
+++ b/openstackclient/image/v1/image.py
@@ -452,7 +452,7 @@ class SaveImage(command.Command):
gc_utils.save_image(data, parsed_args.file)
-class SetImage(show.ShowOne):
+class SetImage(command.Command):
"""Set image properties"""
log = logging.getLogger(__name__ + ".SetImage")
@@ -629,7 +629,7 @@ class SetImage(show.ShowOne):
volume_client.volumes,
parsed_args.volume,
)
- response, body = volume_client.volumes.upload_to_image(
+ volume_client.volumes.upload_to_image(
source_volume.id,
parsed_args.force,
parsed_args.image,
@@ -640,7 +640,6 @@ class SetImage(show.ShowOne):
if parsed_args.disk_format
else image.disk_format),
)
- info = body['os-volume_upload_image']
elif parsed_args.file:
# Send an open file handle to glanceclient so it will
# do a chunked transfer
@@ -673,10 +672,7 @@ class SetImage(show.ShowOne):
kwargs['data'] != sys.stdin):
kwargs['data'].close()
- info = {}
- info.update(image._info)
- info['properties'] = utils.format_dict(info.get('properties', {}))
- return zip(*sorted(six.iteritems(info)))
+ return
class ShowImage(show.ShowOne):