From 5cc6fc2b88296035f687f72d92efe4a3cea78fc7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 5 May 2021 16:59:14 +0300 Subject: Allow to filter multiple tags for image list Currently in case of passing `--tag` several times, only last one will be picked up for the filtering. In the meanwhile Glance allow option to be repeated multiple times to filter based on the multiple tags. Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/789827 Change-Id: I7379d0b0014f0e3d13b02ee5ec6b642a7a5aa7d1 --- openstackclient/image/v2/image.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openstackclient/image') diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 31a5bc4e..117d7a89 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -613,8 +613,10 @@ class ListImage(command.Lister): parser.add_argument( '--tag', metavar='', - default=None, - help=_('Filter images based on tag.'), + action='append', + default=[], + help=_('Filter images based on tag. ' + '(repeat option to filter on multiple tags)'), ) parser.add_argument( '--hidden', -- cgit v1.2.1