From 629b749d02ee8207046ff2525d77eaeeee2a80f2 Mon Sep 17 00:00:00 2001 From: Roey Chen Date: Tue, 23 May 2017 04:49:43 -0700 Subject: [PATCH] NSX Admin: Fix plugin identification Change Ie2a5a4d00bd15ad838737948e2eb8eec69f3303b added entry points for nsxv and nsxv3 plugins, this patch modifies the admin utility to acknowledge new plugin entry points. Change-Id: If3665d093ae50f189b8b937b6b7b9b312743070d --- vmware_nsx/shell/admin/plugins/common/constants.py | 2 ++ vmware_nsx/shell/resources.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/shell/admin/plugins/common/constants.py b/vmware_nsx/shell/admin/plugins/common/constants.py index 1ee2c3fc06..084cf98863 100644 --- a/vmware_nsx/shell/admin/plugins/common/constants.py +++ b/vmware_nsx/shell/admin/plugins/common/constants.py @@ -19,6 +19,8 @@ NSX_INI = '/etc/neutron/plugins/vmware/nsx.ini' # NSX Plugin Constants NSXV3_PLUGIN = 'vmware_nsx.plugin.NsxV3Plugin' NSXV_PLUGIN = 'vmware_nsx.plugin.NsxVPlugin' +VMWARE_NSXV = 'vmware_nsxv' +VMWARE_NSXV3 = 'vmware_nsxv3' # Common Resource Constants NETWORKS = 'networks' diff --git a/vmware_nsx/shell/resources.py b/vmware_nsx/shell/resources.py index 900200e673..a5346bf4d7 100644 --- a/vmware_nsx/shell/resources.py +++ b/vmware_nsx/shell/resources.py @@ -176,9 +176,9 @@ def get_resources(plugin_dir): def get_plugin(): plugin = cfg.CONF.core_plugin plugin_name = '' - if plugin == constants.NSXV3_PLUGIN: + if plugin in (constants.NSXV3_PLUGIN, constants.VMWARE_NSXV3): plugin_name = 'nsxv3' - elif plugin == constants.NSXV_PLUGIN: + elif plugin in (constants.NSXV_PLUGIN, constants.VMWARE_NSXV): plugin_name = 'nsxv' return plugin_name