summaryrefslogtreecommitdiff
path: root/openstackclient/image
diff options
context:
space:
mode:
authorTerryHowe <terrylhowe@gmail.com>2015-06-03 17:18:38 -0600
committerTerry Howe <terrylhowe@gmail.com>2015-06-16 12:34:00 +0000
commitce65164155dcf6dddf7695fbc5ca6352c121cc04 (patch)
treef3f95178e20c211192ed0d1b7a67a92d367ebb83 /openstackclient/image
parentdeb5a9790d07975b46107060c9f3ac02e4f502e7 (diff)
downloadpython-openstackclient-ce65164155dcf6dddf7695fbc5ca6352c121cc04.tar.gz
Add functional tests for image set
This patch includes functional tests for image set and it includes a change to use the OSC utils.format_dict method to format the properties. This will give a more user friendly format to the image commands and it gives a more consistent testable format to the output. Instead of: {u'a': u'b', u'c': u'd'} The user will see: a=b, c=d Change-Id: Ib396316586ffc5dbab231064d5b6dc9425507934
Diffstat (limited to 'openstackclient/image')
-rw-r--r--openstackclient/image/v1/image.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py
index d4d45fa2..85a9e076 100644
--- a/openstackclient/image/v1/image.py
+++ b/openstackclient/image/v1/image.py
@@ -275,6 +275,7 @@ class CreateImage(show.ShowOne):
info = {}
info.update(image._info)
+ info['properties'] = utils.format_dict(info.get('properties', {}))
return zip(*sorted(six.iteritems(info)))
@@ -608,6 +609,7 @@ class SetImage(show.ShowOne):
info = {}
info.update(image._info)
+ info['properties'] = utils.format_dict(info.get('properties', {}))
return zip(*sorted(six.iteritems(info)))
@@ -636,4 +638,5 @@ class ShowImage(show.ShowOne):
info = {}
info.update(image._info)
+ info['properties'] = utils.format_dict(info.get('properties', {}))
return zip(*sorted(six.iteritems(info)))