From 3ff7919862e135b1dd1fe868b4c4bcbf49b82f9c Mon Sep 17 00:00:00 2001 From: asarfaty Date: Mon, 7 Dec 2020 10:02:11 +0200 Subject: [PATCH] Fix nsx-p admin utility file location Change-Id: Iae5aab222d7effb60a86e2f7097309705ebc02a3 --- tox.ini | 1 + .../shell/admin/plugins/nsxp/{ => resources}/migration.py | 3 ++- vmware_nsx/tests/unit/shell/test_admin_utils.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) rename vmware_nsx/shell/admin/plugins/nsxp/{ => resources}/migration.py (92%) diff --git a/tox.ini b/tox.ini index 35f2c3f5b7..a6a9a16983 100644 --- a/tox.ini +++ b/tox.ini @@ -99,6 +99,7 @@ commands = stestr run {posargs} whitelist_externals = stestr +setenv = EDITOR=vi [testenv:py36-dev] basepython = python3.6 diff --git a/vmware_nsx/shell/admin/plugins/nsxp/migration.py b/vmware_nsx/shell/admin/plugins/nsxp/resources/migration.py similarity index 92% rename from vmware_nsx/shell/admin/plugins/nsxp/migration.py rename to vmware_nsx/shell/admin/plugins/nsxp/resources/migration.py index c064b8aa3e..f0f0543313 100644 --- a/vmware_nsx/shell/admin/plugins/nsxp/migration.py +++ b/vmware_nsx/shell/admin/plugins/nsxp/resources/migration.py @@ -23,7 +23,8 @@ from vmware_nsx.shell import resources as shell @admin_utils.output_header def cleanup_db_mappings(resource, event, trigger, **kwargs): """Delete all entries from nsx-t mapping tables in DB""" - return migration.cleanup_db_mappings(resource, event, trigger, **kwargs) + return migration.MP2Policy_cleanup_db_mappings( + resource, event, trigger, **kwargs) registry.subscribe(cleanup_db_mappings, diff --git a/vmware_nsx/tests/unit/shell/test_admin_utils.py b/vmware_nsx/tests/unit/shell/test_admin_utils.py index 1dd1847ea8..da96bf06e2 100644 --- a/vmware_nsx/tests/unit/shell/test_admin_utils.py +++ b/vmware_nsx/tests/unit/shell/test_admin_utils.py @@ -370,6 +370,7 @@ class TestNsxpAdminUtils(AbstractTestAdminUtils, return 'nsxp' def _init_mock_plugin(self): + super(TestNsxpAdminUtils, self)._init_mock_plugin() self._plugin = nsxp_utils.NsxPolicyPluginWrapper() def test_nsxp_resources(self):