summaryrefslogtreecommitdiff
path: root/openstackclient/api
diff options
context:
space:
mode:
authorNobuto Murata <nobuto.murata@canonical.com>2018-04-30 14:32:08 +0900
committerDean Troyer <dtroyer@gmail.com>2018-07-24 22:48:01 +0000
commit860639a548a2c07193662cd361432cb5061c2a7f (patch)
tree906a3076b309926b2a1e5c0de2328481d6cbda2d /openstackclient/api
parente4b8c31cd399f469b3378069187614763c24451d (diff)
downloadpython-openstackclient-860639a548a2c07193662cd361432cb5061c2a7f.tar.gz
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
Diffstat (limited to 'openstackclient/api')
-rw-r--r--openstackclient/api/image_v2.py17
1 files changed, 11 insertions, 6 deletions
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'