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>
This commit is contained in:
@@ -26,16 +26,25 @@ from osc_lib import shell
|
|||||||
import openstackclient
|
import openstackclient
|
||||||
from openstackclient.common import clientmanager
|
from openstackclient.common import clientmanager
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_DOMAIN = 'default'
|
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):
|
class OpenStackShell(shell.OpenStackShell):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
command_manager = commandmanager.CommandManager(
|
||||||
|
'openstack.cli', ignored_modules=IGNORED_MODULES
|
||||||
|
)
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
description=__doc__.strip(),
|
description=__doc__.strip(),
|
||||||
version=openstackclient.__version__,
|
version=openstackclient.__version__,
|
||||||
command_manager=commandmanager.CommandManager('openstack.cli'),
|
command_manager=command_manager,
|
||||||
deferred_help=True,
|
deferred_help=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||||
|
|
||||||
cryptography>=2.7 # BSD/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
|
iso8601>=0.1.11 # MIT
|
||||||
openstacksdk>=4.6.0 # Apache-2.0
|
openstacksdk>=4.6.0 # Apache-2.0
|
||||||
osc-lib>=2.3.0 # Apache-2.0
|
osc-lib>=2.3.0 # Apache-2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user