diff options
| author | Dmitriy Rabotyagov <noonedeadpunk@ya.ru> | 2021-05-05 16:59:14 +0300 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2022-05-16 09:16:52 +0100 |
| commit | 5cc6fc2b88296035f687f72d92efe4a3cea78fc7 (patch) | |
| tree | 0a573286e3820cdf0d859b33f6beffdb519d4e0c /openstackclient/image | |
| parent | 4b97a8518146f1427090801e8535251545617de2 (diff) | |
| download | python-openstackclient-5cc6fc2b88296035f687f72d92efe4a3cea78fc7.tar.gz | |
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
Diffstat (limited to 'openstackclient/image')
| -rw-r--r-- | openstackclient/image/v2/image.py | 6 |
1 files changed, 4 insertions, 2 deletions
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='<tag>', - 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', |
