From 060299c749ce455937111e83494f6f20fa559f64 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 24 Nov 2025 12:28:26 +0000 Subject: [PATCH] Implement conflict resolution Take advantage of functionality recently introduced in cliff to allow us to prefer commands that are in-tree over those provided via plugin packages. This will allow us to move the extensions themselves in-tree. Change-Id: I5dd9bc9743bea779ea1b4a71264c9a77c80033b3 Signed-off-by: Stephen Finucane --- openstackclient/shell.py | 13 +++++++++++-- requirements.txt | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/openstackclient/shell.py b/openstackclient/shell.py index 6bbbb5f7b6..dfc559a04c 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -26,16 +26,25 @@ from osc_lib import shell import openstackclient from openstackclient.common import clientmanager - DEFAULT_DOMAIN = 'default' +# list of modules that were originally out-of-tree and are now in +# core OSC +IGNORED_MODULES = ( + 'neutron_taas.taas_client.osc', + 'neutronclient.osc.v2.taas', +) class OpenStackShell(shell.OpenStackShell): def __init__(self): + command_manager = commandmanager.CommandManager( + 'openstack.cli', ignored_modules=IGNORED_MODULES + ) + super().__init__( description=__doc__.strip(), version=openstackclient.__version__, - command_manager=commandmanager.CommandManager('openstack.cli'), + command_manager=command_manager, deferred_help=True, ) diff --git a/requirements.txt b/requirements.txt index 9a9c79a98e..fc31d78206 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 cryptography>=2.7 # BSD/Apache-2.0 -cliff>=4.8.0 # Apache-2.0 +cliff>=4.13.0 # Apache-2.0 iso8601>=0.1.11 # MIT openstacksdk>=4.6.0 # Apache-2.0 osc-lib>=2.3.0 # Apache-2.0