From 860639a548a2c07193662cd361432cb5061c2a7f Mon Sep 17 00:00:00 2001 From: Nobuto Murata Date: Mon, 30 Apr 2018 14:32:08 +0900 Subject: Support --community in openstack image list "--community" was added to "image create" and "image set" previously, but was missed in "image list". Change-Id: I959fdd7f67ae62c8326659ce52389228152ec019 Story: 2001925 Task: 14453 --- openstackclient/api/image_v2.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'openstackclient/api') diff --git a/openstackclient/api/image_v2.py b/openstackclient/api/image_v2.py index c3628121..d0163189 100644 --- a/openstackclient/api/image_v2.py +++ b/openstackclient/api/image_v2.py @@ -31,6 +31,7 @@ class APIv2(image_v1.APIv1): detailed=False, public=False, private=False, + community=False, shared=False, **filter ): @@ -44,25 +45,29 @@ class APIv2(image_v1.APIv1): Return public images if True :param private: Return private images if True + :param community: + Return commuity images if True :param shared: Return shared images if True - If public, private and shared are all True or all False then all - images are returned. All arguments False is equivalent to no filter - and all images are returned. All arguments True is a filter that - includes all public, private and shared images which is the same set - as all images. + If public, private, community and shared are all True or all False + then all images are returned. All arguments False is equivalent to no + filter and all images are returned. All arguments True is a filter + that includes all public, private, community and shared images which + is the same set as all images. http://docs.openstack.org/api/openstack-image-service/2.0/content/list-images.html """ - if not public and not private and not shared: + if not public and not private and not community and not shared: # No filtering for all False filter.pop('visibility', None) elif public: filter['visibility'] = 'public' elif private: filter['visibility'] = 'private' + elif community: + filter['visibility'] = 'community' elif shared: filter['visibility'] = 'shared' -- cgit v1.2.1