Skip to content

Commit 060299c

Browse files
committed
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 <stephenfin@redhat.com>
1 parent 97c2238 commit 060299c

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

openstackclient/shell.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,25 @@
2626
import openstackclient
2727
from openstackclient.common import clientmanager
2828

29-
3029
DEFAULT_DOMAIN = 'default'
30+
# list of modules that were originally out-of-tree and are now in
31+
# core OSC
32+
IGNORED_MODULES = (
33+
'neutron_taas.taas_client.osc',
34+
'neutronclient.osc.v2.taas',
35+
)
3136

3237

3338
class OpenStackShell(shell.OpenStackShell):
3439
def __init__(self):
40+
command_manager = commandmanager.CommandManager(
41+
'openstack.cli', ignored_modules=IGNORED_MODULES
42+
)
43+
3544
super().__init__(
3645
description=__doc__.strip(),
3746
version=openstackclient.__version__,
38-
command_manager=commandmanager.CommandManager('openstack.cli'),
47+
command_manager=command_manager,
3948
deferred_help=True,
4049
)
4150

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
pbr!=2.1.0,>=2.0.0 # Apache-2.0
66

77
cryptography>=2.7 # BSD/Apache-2.0
8-
cliff>=4.8.0 # Apache-2.0
8+
cliff>=4.13.0 # Apache-2.0
99
iso8601>=0.1.11 # MIT
1010
openstacksdk>=4.6.0 # Apache-2.0
1111
osc-lib>=2.3.0 # Apache-2.0

0 commit comments

Comments
 (0)