summaryrefslogtreecommitdiff
path: root/openstackclient/image
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-10-08 20:38:05 +0000
committerGerrit Code Review <review@openstack.org>2015-10-08 20:38:05 +0000
commit9f23f1f13fa1d36201a5441f9923219cb82be570 (patch)
tree9cd70ae434f984186dcc8d1763ad4aadae96fe94 /openstackclient/image
parent72bf89cccc6c1a8ec520488f4f4b3e05b653e128 (diff)
parent2bd82ab89258110b44135ae4cf2c4678938673d2 (diff)
downloadpython-openstackclient-9f23f1f13fa1d36201a5441f9923219cb82be570.tar.gz
Merge "image set should not show the resource"
Diffstat (limited to 'openstackclient/image')
-rw-r--r--openstackclient/image/v1/image.py10
-rw-r--r--openstackclient/image/v2/image.py5
2 files changed, 4 insertions, 11 deletions
diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py
index 81d384f7..35e9ef43 100644
--- a/openstackclient/image/v1/image.py
+++ b/openstackclient/image/v1/image.py
@@ -454,7 +454,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")
@@ -631,7 +631,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,
@@ -642,7 +642,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
@@ -675,10 +674,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):
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py
index 7ef1f780..7d8b1412 100644
--- a/openstackclient/image/v2/image.py
+++ b/openstackclient/image/v2/image.py
@@ -521,7 +521,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")
@@ -717,9 +717,6 @@ class SetImage(show.ShowOne):
kwargs['tags'] = list(set(image.tags).union(set(parsed_args.tags)))
image = image_client.images.update(image.id, **kwargs)
- info = {}
- info.update(image)
- return zip(*sorted(six.iteritems(info)))
class ShowImage(show.ShowOne):