From 34d1e0c7eb8f4b613ca1f8e672a5367a4078a44a Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Fri, 26 Apr 2019 20:25:38 +0200 Subject: 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 --- openstackclient/image/v2/image.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'openstackclient/image') 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='', @@ -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: -- cgit v1.2.1