diff options
| author | Cyril Roelandt <cyril@redhat.com> | 2019-04-26 20:25:38 +0200 |
|---|---|---|
| committer | Cyril Roelandt <cyril@redhat.com> | 2022-06-07 20:22:34 +0200 |
| commit | 34d1e0c7eb8f4b613ca1f8e672a5367a4078a44a (patch) | |
| tree | 815aab37c516fd6b6201fc272a2465c3bc5c1494 /openstackclient/image | |
| parent | ed304992ebb8db97226a5f3496d20b7a20f93088 (diff) | |
| download | python-openstackclient-34d1e0c7eb8f4b613ca1f8e672a5367a4078a44a.tar.gz | |
Allow users to list all images
Add a "--all" option to "openstack image list", which allows the user to
list all of the images.
Story: 2010071
Change-Id: I56a2e4846d0380d07803305fb830d1a43dfd71b3
Diffstat (limited to 'openstackclient/image')
| -rw-r--r-- | openstackclient/image/v2/image.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 117d7a89..2f2f64ed 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -575,6 +575,13 @@ class ListImage(command.Lister): default=False, help=_("List only shared images"), ) + public_group.add_argument( + "--all", + dest="all", + action="store_true", + default=False, + help=_("List all images"), + ) parser.add_argument( '--property', metavar='<key=value>', @@ -675,6 +682,8 @@ class ListImage(command.Lister): kwargs['visibility'] = 'community' if parsed_args.shared: kwargs['visibility'] = 'shared' + if parsed_args.all: + kwargs['visibility'] = 'all' if parsed_args.limit: kwargs['limit'] = parsed_args.limit if parsed_args.marker: |
