From ce65164155dcf6dddf7695fbc5ca6352c121cc04 Mon Sep 17 00:00:00 2001 From: TerryHowe Date: Wed, 3 Jun 2015 17:18:38 -0600 Subject: 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 --- openstackclient/image/v1/image.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openstackclient/image') 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))) -- cgit v1.2.1