From 84eb58d367af190d21b81fcabad71f3cdb0eeddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C5=91d=20Ill=C3=A9s?= Date: Mon, 21 Oct 2024 14:08:33 +0200 Subject: [PATCH] Add --except-type to list-deliverables command We have the --type argument, where we can list which type of deliverables we want to be listed, but we don't have the opposite approach where we list the types that we DON'T want to be listed. This patch introduces the --except-type argument with wich we can list the deliverables with excluding some types, for example: $ list-deliverables --series epoxy --except-type tempest-plugin The above command lists all deliverables from 2025.1 Epoxy series that aren't tempest-plugins. Change-Id: If00115d3e7de055da2bd7a2dcd08298f70bd5989 --- openstack_releases/cmds/list_deliverables.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openstack_releases/cmds/list_deliverables.py b/openstack_releases/cmds/list_deliverables.py index ccad8df764..3528824709 100644 --- a/openstack_releases/cmds/list_deliverables.py +++ b/openstack_releases/cmds/list_deliverables.py @@ -112,6 +112,13 @@ def main(): choices=sorted(deliverable_schema.release_types), help='deliverable type, such as "library" or "service"', ) + parser.add_argument( + '--except-type', + default=[], + action='append', + choices=sorted(deliverable_schema.release_types), + help='exclude type, such as "tempest-plugin" or "service"', + ) parser.add_argument( '--deliverables-dir', default=openstack_releases.deliverable_dir, @@ -228,6 +235,8 @@ def main(): if args.cycle_based_no_trailing and (not deliv.is_cycle_based or deliv.type == 'trailing'): continue + if args.except_type and deliv.type in args.except_type: + continue if args.type and deliv.type not in args.type: continue if args.no_stable_branch: