]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Rename Neutron core/service plugins for VMware NSX
authorarmando-migliaccio <armamig@gmail.com>
Mon, 3 Feb 2014 21:03:29 +0000 (13:03 -0800)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:30 +0000 (15:20 +0800)
Short aliases are introduced for the NSX plugin(s). This patch
also switches to using the new plugin names/naming scheme in
the unit tests.

Partial-implements blueprint: nicira-plugin-renaming

Change-Id: If1f1431b098bf77b9c85e0afb3d7848083d9d451

62 files changed:
neutron/plugins/vmware/__init__.py [moved from neutron/tests/unit/nicira/nsxlib/__init__.py with 100% similarity]
neutron/plugins/vmware/plugin.py [moved from neutron/tests/unit/nicira/test_nvp_api_request.py with 59% similarity]
neutron/tests/unit/vmware/__init__.py [moved from neutron/tests/unit/nicira/__init__.py with 62% similarity]
neutron/tests/unit/vmware/apiclient/__init__.py [new file with mode: 0644]
neutron/tests/unit/vmware/apiclient/test_api_common.py [moved from neutron/tests/unit/nicira/test_nvp_api_common.py with 96% similarity]
neutron/tests/unit/vmware/apiclient/test_api_request_eventlet.py [moved from neutron/tests/unit/nicira/test_nvp_api_request_eventlet.py with 98% similarity]
neutron/tests/unit/vmware/etc/fake_get_gwservice.json [moved from neutron/tests/unit/nicira/etc/fake_get_gwservice.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lqueue.json [moved from neutron/tests/unit/nicira/etc/fake_get_lqueue.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lrouter.json [moved from neutron/tests/unit/nicira/etc/fake_get_lrouter.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lrouter_lport.json [moved from neutron/tests/unit/nicira/etc/fake_get_lrouter_lport.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lrouter_lport_att.json [moved from neutron/tests/unit/nicira/etc/fake_get_lrouter_lport_att.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lrouter_nat.json [moved from neutron/tests/unit/nicira/etc/fake_get_lrouter_nat.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lswitch.json [moved from neutron/tests/unit/nicira/etc/fake_get_lswitch.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lswitch_lport.json [moved from neutron/tests/unit/nicira/etc/fake_get_lswitch_lport.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lswitch_lport_att.json [moved from neutron/tests/unit/nicira/etc/fake_get_lswitch_lport_att.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_lswitch_lport_status.json [moved from neutron/tests/unit/nicira/etc/fake_get_lswitch_lport_status.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_get_security_profile.json [moved from neutron/tests/unit/nicira/etc/fake_get_security_profile.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_gwservice.json [moved from neutron/tests/unit/nicira/etc/fake_post_gwservice.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_lqueue.json [moved from neutron/tests/unit/nicira/etc/fake_post_lqueue.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_lrouter.json [moved from neutron/tests/unit/nicira/etc/fake_post_lrouter.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_lrouter_lport.json [moved from neutron/tests/unit/nicira/etc/fake_post_lrouter_lport.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_lrouter_nat.json [moved from neutron/tests/unit/nicira/etc/fake_post_lrouter_nat.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_lswitch.json [moved from neutron/tests/unit/nicira/etc/fake_post_lswitch.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_lswitch_lport.json [moved from neutron/tests/unit/nicira/etc/fake_post_lswitch_lport.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_post_security_profile.json [moved from neutron/tests/unit/nicira/etc/fake_post_security_profile.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_put_lrouter_lport_att.json [moved from neutron/tests/unit/nicira/etc/fake_put_lrouter_lport_att.json with 100% similarity]
neutron/tests/unit/vmware/etc/fake_put_lswitch_lport_att.json [moved from neutron/tests/unit/nicira/etc/fake_put_lswitch_lport_att.json with 100% similarity]
neutron/tests/unit/vmware/etc/neutron.conf.test [moved from neutron/tests/unit/nicira/etc/neutron.conf.test with 100% similarity]
neutron/tests/unit/vmware/etc/nsx.ini.agentless.test [moved from neutron/tests/unit/nicira/etc/nsx.ini.agentless.test with 100% similarity]
neutron/tests/unit/vmware/etc/nsx.ini.basic.test [moved from neutron/tests/unit/nicira/etc/nsx.ini.basic.test with 100% similarity]
neutron/tests/unit/vmware/etc/nsx.ini.full.test [moved from neutron/tests/unit/nicira/etc/nsx.ini.full.test with 100% similarity]
neutron/tests/unit/vmware/etc/nsx.ini.test [moved from neutron/tests/unit/nicira/etc/nsx.ini.test with 100% similarity]
neutron/tests/unit/vmware/etc/nvp.ini.full.test [moved from neutron/tests/unit/nicira/etc/nvp.ini.full.test with 100% similarity]
neutron/tests/unit/vmware/etc/vcns.ini.test [moved from neutron/tests/unit/nicira/etc/vcns.ini.test with 100% similarity]
neutron/tests/unit/vmware/fake_nvpapiclient.py [moved from neutron/tests/unit/nicira/fake_nvpapiclient.py with 100% similarity]
neutron/tests/unit/vmware/nsxlib/__init__.py [new file with mode: 0644]
neutron/tests/unit/vmware/nsxlib/base.py [moved from neutron/tests/unit/nicira/nsxlib/base.py with 92% similarity]
neutron/tests/unit/vmware/nsxlib/test_l2gateway.py [moved from neutron/tests/unit/nicira/nsxlib/test_l2gateway.py with 99% similarity]
neutron/tests/unit/vmware/nsxlib/test_lsn.py [moved from neutron/tests/unit/nicira/nsxlib/test_lsn.py with 100% similarity]
neutron/tests/unit/vmware/nsxlib/test_queue.py [moved from neutron/tests/unit/nicira/nsxlib/test_queue.py with 98% similarity]
neutron/tests/unit/vmware/nsxlib/test_router.py [moved from neutron/tests/unit/nicira/nsxlib/test_router.py with 99% similarity]
neutron/tests/unit/vmware/nsxlib/test_secgroup.py [moved from neutron/tests/unit/nicira/nsxlib/test_secgroup.py with 99% similarity]
neutron/tests/unit/vmware/nsxlib/test_switch.py [moved from neutron/tests/unit/nicira/nsxlib/test_switch.py with 99% similarity]
neutron/tests/unit/vmware/nsxlib/test_versioning.py [moved from neutron/tests/unit/nicira/nsxlib/test_versioning.py with 100% similarity]
neutron/tests/unit/vmware/test_agent_scheduler.py [moved from neutron/tests/unit/nicira/test_agent_scheduler.py with 89% similarity]
neutron/tests/unit/vmware/test_dhcpmeta.py [moved from neutron/tests/unit/nicira/test_dhcpmeta.py with 100% similarity]
neutron/tests/unit/vmware/test_edge_router.py [moved from neutron/tests/unit/nicira/test_edge_router.py with 96% similarity]
neutron/tests/unit/vmware/test_fwaas_plugin.py [moved from neutron/tests/unit/nicira/test_fwaas_plugin.py with 99% similarity]
neutron/tests/unit/vmware/test_lbaas_plugin.py [moved from neutron/tests/unit/nicira/test_lbaas_plugin.py with 99% similarity]
neutron/tests/unit/vmware/test_maclearning.py [moved from neutron/tests/unit/nicira/test_maclearning.py with 93% similarity]
neutron/tests/unit/vmware/test_networkgw.py [moved from neutron/tests/unit/nicira/test_networkgw.py with 100% similarity]
neutron/tests/unit/vmware/test_nsx_db.py [moved from neutron/tests/unit/nicira/test_nicira_db.py with 100% similarity]
neutron/tests/unit/vmware/test_nsx_opts.py [moved from neutron/tests/unit/nicira/test_nvpopts.py with 99% similarity]
neutron/tests/unit/vmware/test_nsx_plugin.py [moved from neutron/tests/unit/nicira/test_nicira_plugin.py with 98% similarity]
neutron/tests/unit/vmware/test_nsx_sync.py [moved from neutron/tests/unit/nicira/test_nvp_sync.py with 98% similarity]
neutron/tests/unit/vmware/test_nsx_utils.py [moved from neutron/tests/unit/nicira/test_nsx_utils.py with 85% similarity]
neutron/tests/unit/vmware/test_vcns_driver.py [moved from neutron/tests/unit/nicira/test_vcns_driver.py with 99% similarity]
neutron/tests/unit/vmware/vshield/__init__.py [moved from neutron/tests/unit/nicira/vshield/__init__.py with 100% similarity]
neutron/tests/unit/vmware/vshield/fake_vcns.py [moved from neutron/tests/unit/nicira/vshield/fake_vcns.py with 100% similarity]
neutron/tests/unit/vmware/vshield/test_firewall_driver.py [moved from neutron/tests/unit/nicira/vshield/test_firewall_driver.py with 99% similarity]
neutron/tests/unit/vmware/vshield/test_loadbalancer_driver.py [moved from neutron/tests/unit/nicira/vshield/test_loadbalancer_driver.py with 98% similarity]
setup.cfg

similarity index 59%
rename from neutron/tests/unit/nicira/test_nvp_api_request.py
rename to neutron/plugins/vmware/plugin.py
index 5687f79886128ff80c834726196b3d3ce070800f..19c99c93c4e19b0adcf0457cbedcbcfa1da91b59 100644 (file)
@@ -1,6 +1,5 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 Nicira, Inc.
+# Copyright 2014 VMware, Inc.
+#
 # All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
+#
 
-import eventlet
-eventlet.monkey_patch()
-import logging
-import urllib2
-
-from neutron.tests import base
-
-logging.basicConfig(level=logging.DEBUG)
-lg = logging.getLogger("test_nvp_api_request")
-
-REQUEST_TIMEOUT = 1
-
-
-def fetch(url):
-    return urllib2.urlopen(url).read()
-
-
-class NvpApiRequestTest(base.BaseTestCase):
+from neutron.plugins.nicira import NeutronPlugin
+from neutron.plugins.nicira import NeutronServicePlugin
 
-    pass
+NsxPlugin = NeutronPlugin.NvpPluginV2
+NsxServicePlugin = NeutronServicePlugin.NvpAdvancedPlugin
similarity index 62%
rename from neutron/tests/unit/nicira/__init__.py
rename to neutron/tests/unit/vmware/__init__.py
index 9d5a849ed1eaf07f05f39325881ff297b5da40e1..d6210f3a9d11a43a91abb77f6e53d5a15f4d2dae 100644 (file)
@@ -19,40 +19,37 @@ import os
 
 import neutron.plugins.nicira.api_client.client_eventlet as client
 from neutron.plugins.nicira import extensions
-import neutron.plugins.nicira.NeutronPlugin as plugin
-import neutron.plugins.nicira.NeutronServicePlugin as service_plugin
 import neutron.plugins.nicira.NvpApiClient as nvpapi
 from neutron.plugins.nicira import nvplib
-from neutron.plugins.nicira.vshield.common import (
-    VcnsApiClient as vcnsapi)
+from neutron.plugins.nicira.vshield.common import VcnsApiClient as vcnsapi
 from neutron.plugins.nicira.vshield import vcns
 import neutron.plugins.nicira.vshield.vcns_driver as vcnsdriver
+import neutron.plugins.vmware.plugin as neutron_plugin
 
-nvp_plugin = plugin.NvpPluginV2
-nvp_service_plugin = service_plugin.NvpAdvancedPlugin
+plugin = neutron_plugin.NsxPlugin
+service_plugin = neutron_plugin.NsxServicePlugin
 api_helper = nvpapi.NVPApiHelper
-nvp_client = client.NvpApiClientEventlet
+api_client = client.NvpApiClientEventlet
 vcns_class = vcns.Vcns
 vcns_driver = vcnsdriver.VcnsDriver
 vcns_api_helper = vcnsapi.VcnsApiHelper
 
 STUBS_PATH = os.path.join(os.path.dirname(__file__), 'etc')
-NVPEXT_PATH = os.path.dirname(extensions.__file__)
-NVPAPI_NAME = '%s.%s' % (api_helper.__module__, api_helper.__name__)
-NVPLIB_NAME = nvplib.__name__
-PLUGIN_NAME = '%s.%s' % (nvp_plugin.__module__, nvp_plugin.__name__)
-SERVICE_PLUGIN_NAME = '%s.%s' % (nvp_service_plugin.__module__,
-                                 nvp_service_plugin.__name__)
-CLIENT_NAME = '%s.%s' % (nvp_client.__module__, nvp_client.__name__)
+NSXEXT_PATH = os.path.dirname(extensions.__file__)
+NSXAPI_NAME = '%s.%s' % (api_helper.__module__, api_helper.__name__)
+NSXLIB_NAME = nvplib.__name__
+PLUGIN_NAME = '%s.%s' % (plugin.__module__, plugin.__name__)
+SERVICE_PLUGIN_NAME = '%s.%s' % (service_plugin.__module__,
+                                 service_plugin.__name__)
+CLIENT_NAME = '%s.%s' % (api_client.__module__, api_client.__name__)
 VCNS_NAME = '%s.%s' % (vcns_class.__module__, vcns_class.__name__)
 VCNS_DRIVER_NAME = '%s.%s' % (vcns_driver.__module__, vcns_driver.__name__)
-VCNSAPI_NAME = '%s.%s' % (vcns_api_helper.__module__,
-                          vcns_api_helper.__name__)
+VCNSAPI_NAME = '%s.%s' % (vcns_api_helper.__module__, vcns_api_helper.__name__)
 
 
 def get_fake_conf(filename):
     return os.path.join(STUBS_PATH, filename)
 
 
-def nicira_method(method_name, module_name='nvplib'):
+def nsx_method(method_name, module_name='nvplib'):
     return '%s.%s.%s' % ('neutron.plugins.nicira', module_name, method_name)
diff --git a/neutron/tests/unit/vmware/apiclient/__init__.py b/neutron/tests/unit/vmware/apiclient/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
similarity index 96%
rename from neutron/tests/unit/nicira/test_nvp_api_common.py
rename to neutron/tests/unit/vmware/apiclient/test_api_common.py
index 2943b7fa12fbcc557a3ac7fd2b22453dc1bcb07a..fde52abdc6939aba775e3f9a0e739b4e81d82606 100644 (file)
@@ -1,6 +1,6 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
-# Copyright 2011 Nicira, Inc.
+# Copyright 2011 VMware, Inc.
 # All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-# System
 import httplib
 
-# Local
 import neutron.plugins.nicira.api_client.common as naco
 from neutron.tests import base
 
similarity index 98%
rename from neutron/tests/unit/nicira/test_nvp_api_request_eventlet.py
rename to neutron/tests/unit/vmware/apiclient/test_api_request_eventlet.py
index cbf75b0a49b4c628c4ab14479a3214e4887c6f57..cced00cc4e8810dafea6ae9080de55d75dac6004 100644 (file)
@@ -1,6 +1,6 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
-# Copyright (C) 2009-2012 Nicira Networks, Inc. All Rights Reserved.
+# Copyright (C) 2009-2012 VMware, Inc. All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    not use this file except in compliance with the License. You may obtain
@@ -27,11 +27,11 @@ from mock import patch
 from neutron.plugins.nicira.api_client import client_eventlet as nace
 from neutron.plugins.nicira.api_client import request_eventlet as nare
 from neutron.tests import base
-from neutron.tests.unit.nicira import CLIENT_NAME
+from neutron.tests.unit.vmware import CLIENT_NAME
 
 
 logging.basicConfig(level=logging.DEBUG)
-LOG = logging.getLogger("test_nvp_api_request_eventlet")
+LOG = logging.getLogger("test_api_request_eventlet")
 
 
 REQUEST_TIMEOUT = 1
@@ -157,7 +157,6 @@ class NvpApiRequestEventletTest(base.BaseTestCase):
         self.client.acquire_connection.return_value = None
 
         self.req._issue_request()
-        LOG.info('request_error: %s' % self.req._request_error)
         self.assertIsInstance(self.req._request_error, Exception)
         self.assertTrue(self.client.acquire_connection.called)
 
diff --git a/neutron/tests/unit/vmware/nsxlib/__init__.py b/neutron/tests/unit/vmware/nsxlib/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
similarity index 92%
rename from neutron/tests/unit/nicira/nsxlib/base.py
rename to neutron/tests/unit/vmware/nsxlib/base.py
index 2fcf894e1f269523f3dccf8a5252c7ec626a1923..09ea48b9abd6337c4c96db2b6a227854c662def5 100644 (file)
@@ -23,10 +23,10 @@ from neutron.plugins.nicira import nsx_cluster
 from neutron.plugins.nicira import NvpApiClient
 from neutron.plugins.nicira import nvplib
 from neutron.tests import base
-from neutron.tests.unit.nicira import fake_nvpapiclient
-from neutron.tests.unit.nicira import NVPAPI_NAME
-from neutron.tests.unit.nicira import STUBS_PATH
 from neutron.tests.unit import test_api_v2
+from neutron.tests.unit.vmware import fake_nvpapiclient
+from neutron.tests.unit.vmware import NSXAPI_NAME
+from neutron.tests.unit.vmware import STUBS_PATH
 
 _uuid = test_api_v2._uuid
 
@@ -36,7 +36,7 @@ class NsxlibTestCase(base.BaseTestCase):
     def setUp(self):
         # mock nvp api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nsxapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nsxapi = mock.patch(NSXAPI_NAME, autospec=True)
         instance = self.mock_nsxapi.start()
         instance.return_value.login.return_value = "the_cookie"
         fake_version = getattr(self, 'fake_version', "3.0")
@@ -70,7 +70,7 @@ class NsxlibNegativeBaseTestCase(base.BaseTestCase):
     def setUp(self):
         # mock nsx api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nsxapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nsxapi = mock.patch(NSXAPI_NAME, autospec=True)
         instance = self.mock_nsxapi.start()
         instance.return_value.login.return_value = "the_cookie"
         # Choose 3.0, but the version is irrelevant for the aim of
similarity index 99%
rename from neutron/tests/unit/nicira/nsxlib/test_l2gateway.py
rename to neutron/tests/unit/vmware/nsxlib/test_l2gateway.py
index 6529b6a5fcef925714b47ba7faf0d7424f67d874..c70efe1462fec4a9f334ee89eefe0f5b602fa02a 100644 (file)
@@ -17,8 +17,8 @@
 from neutron.plugins.nicira.nsxlib import l2gateway as l2gwlib
 from neutron.plugins.nicira.nsxlib import switch as switchlib
 from neutron.plugins.nicira import nvplib
-from neutron.tests.unit.nicira.nsxlib import base
 from neutron.tests.unit import test_api_v2
+from neutron.tests.unit.vmware.nsxlib import base
 
 _uuid = test_api_v2._uuid
 
similarity index 98%
rename from neutron/tests/unit/nicira/nsxlib/test_queue.py
rename to neutron/tests/unit/vmware/nsxlib/test_queue.py
index afa70fc4b5d1cc21f9916b94b83d428971c5e1bc..c4fd5f125ac9759c4f8115034802c85ad8565c6c 100644 (file)
@@ -19,7 +19,7 @@ import mock
 from neutron.common import exceptions
 from neutron.plugins.nicira.nsxlib import queue as queuelib
 from neutron.plugins.nicira import NvpApiClient
-from neutron.tests.unit.nicira.nsxlib import base
+from neutron.tests.unit.vmware.nsxlib import base
 
 
 class TestLogicalQueueLib(base.NsxlibTestCase):
similarity index 99%
rename from neutron/tests/unit/nicira/nsxlib/test_router.py
rename to neutron/tests/unit/vmware/nsxlib/test_router.py
index ad2afeb38867b9f62a21328573f0a394056ff17f..daefab8fd6ff468f47cd62119ed8d169a3b7b47b 100644 (file)
@@ -24,8 +24,8 @@ from neutron.plugins.nicira.nsxlib import router as routerlib
 from neutron.plugins.nicira.nsxlib import switch as switchlib
 from neutron.plugins.nicira import NvpApiClient
 from neutron.plugins.nicira import nvplib
-from neutron.tests.unit.nicira.nsxlib import base
 from neutron.tests.unit import test_api_v2
+from neutron.tests.unit.vmware.nsxlib import base
 
 _uuid = test_api_v2._uuid
 
similarity index 99%
rename from neutron/tests/unit/nicira/nsxlib/test_secgroup.py
rename to neutron/tests/unit/vmware/nsxlib/test_secgroup.py
index ca65da464ba06c8f7f9495a9a756e1f2fd5968e9..5028154343a38cc23aede4dcedd5b17aa505625c 100644 (file)
@@ -17,7 +17,7 @@
 from neutron.common import exceptions
 from neutron.plugins.nicira.nsxlib import secgroup as secgrouplib
 from neutron.plugins.nicira import nvplib
-from neutron.tests.unit.nicira.nsxlib import base
+from neutron.tests.unit.vmware.nsxlib import base
 
 
 class SecurityProfileTestCase(base.NsxlibTestCase):
similarity index 99%
rename from neutron/tests/unit/nicira/nsxlib/test_switch.py
rename to neutron/tests/unit/vmware/nsxlib/test_switch.py
index 6ba1621a06604c78ee64cab4877e40fd93b7b240..5e1a5aa3b2471f15b1aee2bd52301448e0674e1b 100644 (file)
@@ -21,8 +21,8 @@ from neutron.common import constants
 from neutron.common import exceptions
 from neutron.plugins.nicira.common import utils
 from neutron.plugins.nicira.nsxlib import switch as switchlib
-from neutron.tests.unit.nicira.nsxlib import base
 from neutron.tests.unit import test_api_v2
+from neutron.tests.unit.vmware.nsxlib import base
 
 _uuid = test_api_v2._uuid
 
similarity index 89%
rename from neutron/tests/unit/nicira/test_agent_scheduler.py
rename to neutron/tests/unit/vmware/test_agent_scheduler.py
index 8442dfd5d9e97d4435b88aa749d8c71949cd7abf..69cbcc6fa55c36d8dc58cbb5dcffe53dc18d352a 100644 (file)
@@ -22,12 +22,12 @@ from neutron.common import constants
 from neutron.common.test_lib import test_config
 from neutron.plugins.nicira.common import sync
 from neutron.plugins.nicira.dhcp_meta import rpc
-from neutron.tests.unit.nicira import fake_nvpapiclient
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import NVPAPI_NAME
-from neutron.tests.unit.nicira import PLUGIN_NAME
-from neutron.tests.unit.nicira import STUBS_PATH
 from neutron.tests.unit.openvswitch import test_agent_scheduler as test_base
+from neutron.tests.unit.vmware import fake_nvpapiclient
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import NSXAPI_NAME
+from neutron.tests.unit.vmware import PLUGIN_NAME
+from neutron.tests.unit.vmware import STUBS_PATH
 
 
 class NVPDhcpAgentNotifierTestCase(test_base.OvsDhcpAgentNotifierTestCase):
@@ -38,7 +38,7 @@ class NVPDhcpAgentNotifierTestCase(test_base.OvsDhcpAgentNotifierTestCase):
 
         # mock nvp api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nvpapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nvpapi = mock.patch(NSXAPI_NAME, autospec=True)
         instance = self.mock_nvpapi.start()
         # Avoid runs of the synchronizer looping call
         patch_sync = mock.patch.object(sync, '_start_loopingcall')
similarity index 96%
rename from neutron/tests/unit/nicira/test_edge_router.py
rename to neutron/tests/unit/vmware/test_edge_router.py
index 9f8bdb209ce820d64c2f5e736356d4710fce349a..87139c10528d964e80ff4e27d489f33f7e6423d7 100644 (file)
@@ -29,12 +29,12 @@ from neutron.openstack.common import uuidutils
 from neutron.plugins.nicira.common import utils
 from neutron.plugins.nicira import NeutronServicePlugin as nsp
 from neutron.tests import base
-from neutron.tests.unit.nicira import NVPEXT_PATH
-from neutron.tests.unit.nicira import SERVICE_PLUGIN_NAME
-from neutron.tests.unit.nicira import test_nicira_plugin
-from neutron.tests.unit.nicira import VCNS_NAME
-from neutron.tests.unit.nicira.vshield import fake_vcns
 from neutron.tests.unit import test_l3_plugin
+from neutron.tests.unit.vmware import NSXEXT_PATH
+from neutron.tests.unit.vmware import SERVICE_PLUGIN_NAME
+from neutron.tests.unit.vmware import test_nsx_plugin
+from neutron.tests.unit.vmware import VCNS_NAME
+from neutron.tests.unit.vmware.vshield import fake_vcns
 
 _uuid = uuidutils.generate_uuid
 
@@ -63,7 +63,7 @@ class ServiceRouterTestExtensionManager(object):
         return []
 
 
-class ServiceRouterTest(test_nicira_plugin.NiciraL3NatTest,
+class ServiceRouterTest(test_nsx_plugin.NiciraL3NatTest,
                         test_l3_plugin.L3NatTestCaseMixin):
 
     def vcns_patch(self):
@@ -97,7 +97,7 @@ class ServiceRouterTest(test_nicira_plugin.NiciraL3NatTest,
             self.fc2.enable_service_loadbalancer)
 
     def setUp(self, ext_mgr=None, service_plugins=None):
-        cfg.CONF.set_override('api_extensions_path', NVPEXT_PATH)
+        cfg.CONF.set_override('api_extensions_path', NSXEXT_PATH)
         cfg.CONF.set_override('task_status_check_interval', 100, group="vcns")
 
         # vcns does not support duplicated router name, ignore router name
@@ -158,7 +158,7 @@ class ServiceRouterTest(test_nicira_plugin.NiciraL3NatTest,
 
 
 class ServiceRouterTestCase(ServiceRouterTest,
-                            test_nicira_plugin.TestNiciraL3NatTestCase):
+                            test_nsx_plugin.TestNiciraL3NatTestCase):
 
     def test_router_create(self):
         name = 'router1'
similarity index 99%
rename from neutron/tests/unit/nicira/test_fwaas_plugin.py
rename to neutron/tests/unit/vmware/test_fwaas_plugin.py
index 1060321ab30b946399a96056f2b5e6497cee88f6..9f0c226aeb5b4da8c8507755e31837c5a5406340 100644 (file)
@@ -27,13 +27,11 @@ from neutron import manager
 from neutron.openstack.common import uuidutils
 from neutron.plugins.common import constants as const
 from neutron.tests.unit.db.firewall import test_db_firewall
-from neutron.tests.unit.nicira import test_edge_router
+from neutron.tests.unit.vmware import test_edge_router
 
 _uuid = uuidutils.generate_uuid
 
-FW_PLUGIN_CLASS = (
-    "neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin"
-)
+FW_PLUGIN_CLASS = "neutron.plugins.vmware.plugin.NsxServicePlugin"
 
 
 class FirewallTestExtensionManager(
similarity index 99%
rename from neutron/tests/unit/nicira/test_lbaas_plugin.py
rename to neutron/tests/unit/vmware/test_lbaas_plugin.py
index 15618c54eb17cf8c97278ae4fd0ab115475c018c..0c9cc8408c542c8dce15949865d0841eb906b9c3 100644 (file)
@@ -27,13 +27,11 @@ from neutron.extensions import loadbalancer as lb
 from neutron import manager
 from neutron.openstack.common import uuidutils
 from neutron.tests.unit.db.loadbalancer import test_db_loadbalancer
-from neutron.tests.unit.nicira import test_edge_router
+from neutron.tests.unit.vmware import test_edge_router
 
 _uuid = uuidutils.generate_uuid
 
-LBAAS_PLUGIN_CLASS = (
-    "neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin"
-)
+LBAAS_PLUGIN_CLASS = "neutron.plugins.vmware.plugin.NsxServicePlugin"
 
 
 class LoadBalancerTestExtensionManager(
similarity index 93%
rename from neutron/tests/unit/nicira/test_maclearning.py
rename to neutron/tests/unit/vmware/test_maclearning.py
index 6057fb20149f5454fc4468fe0a4778d7f20754b7..306430992edd1c26ef52061de621c08bb27608aa 100644 (file)
@@ -26,13 +26,13 @@ from neutron import context
 from neutron.extensions import agent
 from neutron.plugins.nicira.common import sync
 from neutron.plugins.nicira.NvpApiClient import NVPVersion
-from neutron.tests.unit.nicira import fake_nvpapiclient
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import NVPAPI_NAME
-from neutron.tests.unit.nicira import NVPEXT_PATH
-from neutron.tests.unit.nicira import PLUGIN_NAME
-from neutron.tests.unit.nicira import STUBS_PATH
 from neutron.tests.unit import test_db_plugin
+from neutron.tests.unit.vmware import fake_nvpapiclient
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import NSXAPI_NAME
+from neutron.tests.unit.vmware import NSXEXT_PATH
+from neutron.tests.unit.vmware import PLUGIN_NAME
+from neutron.tests.unit.vmware import STUBS_PATH
 
 
 class MacLearningExtensionManager(object):
@@ -59,7 +59,7 @@ class MacLearningDBTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
     def setUp(self):
         self.adminContext = context.get_admin_context()
         test_config['config_files'] = [get_fake_conf('nsx.ini.full.test')]
-        cfg.CONF.set_override('api_extensions_path', NVPEXT_PATH)
+        cfg.CONF.set_override('api_extensions_path', NSXEXT_PATH)
         # Save the original RESOURCE_ATTRIBUTE_MAP
         self.saved_attr_map = {}
         for resource, attrs in attributes.RESOURCE_ATTRIBUTE_MAP.iteritems():
@@ -67,7 +67,7 @@ class MacLearningDBTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
         ext_mgr = MacLearningExtensionManager()
         # mock nvp api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nvpapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nvpapi = mock.patch(NSXAPI_NAME, autospec=True)
         instance = self.mock_nvpapi.start()
         # Avoid runs of the synchronizer looping call
         patch_sync = mock.patch.object(sync, '_start_loopingcall')
similarity index 99%
rename from neutron/tests/unit/nicira/test_nvpopts.py
rename to neutron/tests/unit/vmware/test_nsx_opts.py
index 1b4a5212d977f0302c9de0bbc29566730c4276e6..4405082cfcafd7d10f4f44e75aae6287f6e32966 100644 (file)
@@ -30,8 +30,8 @@ from neutron.plugins.nicira import nsx_cluster
 from neutron.plugins.nicira.nsxlib import lsn as lsnlib
 from neutron.plugins.nicira import NvpApiClient as nvp_client
 from neutron.tests import base
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import PLUGIN_NAME
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import PLUGIN_NAME
 
 BASE_CONF_PATH = get_fake_conf('neutron.conf.test')
 NSX_INI_PATH = get_fake_conf('nsx.ini.basic.test')
similarity index 98%
rename from neutron/tests/unit/nicira/test_nicira_plugin.py
rename to neutron/tests/unit/vmware/test_nsx_plugin.py
index 76dd623516de4014aa039c46030112eedfc21544..9f31d110bf2e44fac56b702578e5c2e2bce28fd2 100644 (file)
@@ -51,13 +51,6 @@ from neutron.plugins.nicira import nsxlib
 from neutron.plugins.nicira import NvpApiClient
 from neutron.plugins.nicira.NvpApiClient import NVPVersion
 from neutron.tests.unit import _test_extension_portbindings as test_bindings
-from neutron.tests.unit.nicira import fake_nvpapiclient
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import NVPAPI_NAME
-from neutron.tests.unit.nicira import NVPEXT_PATH
-from neutron.tests.unit.nicira import PLUGIN_NAME
-from neutron.tests.unit.nicira import STUBS_PATH
-import neutron.tests.unit.nicira.test_networkgw as test_l2_gw
 import neutron.tests.unit.test_db_plugin as test_plugin
 import neutron.tests.unit.test_extension_allowedaddresspairs as test_addr_pair
 import neutron.tests.unit.test_extension_ext_gw_mode as test_ext_gw_mode
@@ -66,6 +59,13 @@ import neutron.tests.unit.test_extension_security_group as ext_sg
 from neutron.tests.unit import test_extensions
 import neutron.tests.unit.test_l3_plugin as test_l3_plugin
 from neutron.tests.unit import testlib_api
+from neutron.tests.unit.vmware import fake_nvpapiclient
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import NSXAPI_NAME
+from neutron.tests.unit.vmware import NSXEXT_PATH
+from neutron.tests.unit.vmware import PLUGIN_NAME
+from neutron.tests.unit.vmware import STUBS_PATH
+import neutron.tests.unit.vmware.test_networkgw as test_l2_gw
 
 
 from neutron.openstack.common import log
@@ -108,7 +108,7 @@ class NiciraPluginV2TestCase(test_plugin.NeutronDbPluginV2TestCase):
         test_lib.test_config['config_files'] = [get_fake_conf('nsx.ini.test')]
         # mock nvp api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nvpapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nvpapi = mock.patch(NSXAPI_NAME, autospec=True)
         self.mock_instance = self.mock_nvpapi.start()
         # Avoid runs of the synchronizer looping call
         patch_sync = mock.patch.object(sync, '_start_loopingcall')
@@ -390,7 +390,7 @@ class NiciraPortSecurityTestCase(psec.PortSecurityDBTestCase):
         test_lib.test_config['config_files'] = [get_fake_conf('nsx.ini.test')]
         # mock nvp api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nvpapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nvpapi = mock.patch(NSXAPI_NAME, autospec=True)
         instance = self.mock_nvpapi.start()
         instance.return_value.login.return_value = "the_cookie"
         # Avoid runs of the synchronizer looping call
@@ -423,7 +423,7 @@ class NiciraSecurityGroupsTestCase(ext_sg.SecurityGroupDBTestCase):
         test_lib.test_config['config_files'] = [get_fake_conf('nsx.ini.test')]
         # mock nvp api client
         fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        self.mock_nvpapi = mock.patch(NVPAPI_NAME, autospec=True)
+        self.mock_nvpapi = mock.patch(NSXAPI_NAME, autospec=True)
         instance = self.mock_nvpapi.start()
         instance.return_value.login.return_value = "the_cookie"
         # Avoid runs of the synchronizer looping call
@@ -521,7 +521,7 @@ class NiciraL3NatTest(test_l3_plugin.L3BaseForIntTests,
         for item in l3.RESOURCE_ATTRIBUTE_MAP:
             self._l3_attribute_map_bk[item] = (
                 l3.RESOURCE_ATTRIBUTE_MAP[item].copy())
-        cfg.CONF.set_override('api_extensions_path', NVPEXT_PATH)
+        cfg.CONF.set_override('api_extensions_path', NSXEXT_PATH)
         l3_attribute_map_bk = backup_l3_attribute_map()
         self.addCleanup(restore_l3_attribute_map, l3_attribute_map_bk)
         ext_mgr = ext_mgr or TestNiciraL3ExtensionManager()
@@ -1048,7 +1048,7 @@ class NvpQoSTestExtensionManager(object):
 class TestQoSQueue(NiciraPluginV2TestCase):
 
     def setUp(self, plugin=None):
-        cfg.CONF.set_override('api_extensions_path', NVPEXT_PATH)
+        cfg.CONF.set_override('api_extensions_path', NSXEXT_PATH)
         super(TestQoSQueue, self).setUp()
         ext_mgr = NvpQoSTestExtensionManager()
         self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
@@ -1460,7 +1460,7 @@ class TestNiciraNetworkGateway(NiciraPluginV2TestCase,
                                test_l2_gw.NetworkGatewayDbTestCase):
 
     def setUp(self, plugin=PLUGIN_NAME, ext_mgr=None):
-        cfg.CONF.set_override('api_extensions_path', NVPEXT_PATH)
+        cfg.CONF.set_override('api_extensions_path', NSXEXT_PATH)
         super(TestNiciraNetworkGateway,
               self).setUp(plugin=plugin, ext_mgr=ext_mgr)
 
@@ -1559,7 +1559,7 @@ class TestNiciraNetworkGateway(NiciraPluginV2TestCase,
 class TestNiciraMultiProviderNetworks(NiciraPluginV2TestCase):
 
     def setUp(self, plugin=None):
-        cfg.CONF.set_override('api_extensions_path', NVPEXT_PATH)
+        cfg.CONF.set_override('api_extensions_path', NSXEXT_PATH)
         super(TestNiciraMultiProviderNetworks, self).setUp()
 
     def test_create_network_provider(self):
similarity index 98%
rename from neutron/tests/unit/nicira/test_nvp_sync.py
rename to neutron/tests/unit/vmware/test_nsx_sync.py
index b332fbe75f2c3d4cac74ddeda3a13310536b2bad..652b32d8d7beac508d2ba2271605cd2c197c2b69 100644 (file)
@@ -27,19 +27,18 @@ from neutron.common import config
 from neutron.common import constants
 from neutron import context
 from neutron.openstack.common import jsonutils as json
+from neutron.openstack.common import log
 from neutron.plugins.nicira.common import sync
-from neutron.plugins.nicira import NeutronPlugin
 from neutron.plugins.nicira import nsx_cluster
 from neutron.plugins.nicira import NvpApiClient
 from neutron.plugins.nicira import nvplib
+from neutron.plugins.vmware import plugin
 from neutron.tests import base
-from neutron.tests.unit.nicira import fake_nvpapiclient
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import NVPAPI_NAME
-from neutron.tests.unit.nicira import STUBS_PATH
 from neutron.tests.unit import test_api_v2
-
-from neutron.openstack.common import log
+from neutron.tests.unit.vmware import fake_nvpapiclient
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import NSXAPI_NAME
+from neutron.tests.unit.vmware import STUBS_PATH
 
 LOG = log.getLogger(__name__)
 
@@ -259,7 +258,7 @@ class NvpSyncTestCase(base.BaseTestCase):
     def setUp(self):
         # mock nvp api client
         self.fc = fake_nvpapiclient.FakeClient(STUBS_PATH)
-        mock_nvpapi = mock.patch(NVPAPI_NAME, autospec=True)
+        mock_nvpapi = mock.patch(NSXAPI_NAME, autospec=True)
         # Avoid runs of the synchronizer looping call
         # These unit tests will excplicitly invoke synchronization
         patch_sync = mock.patch.object(sync, '_start_loopingcall')
@@ -288,7 +287,7 @@ class NvpSyncTestCase(base.BaseTestCase):
                 '--config-file', get_fake_conf('nsx.ini.test')]
         config.parse(args=args)
         cfg.CONF.set_override('allow_overlapping_ips', True)
-        self._plugin = NeutronPlugin.NvpPluginV2()
+        self._plugin = plugin.NsxPlugin()
         # Mock neutron manager plugin load functions to speed up tests
         mock_nm_get_plugin = mock.patch('neutron.manager.NeutronManager.'
                                         'get_plugin')
similarity index 85%
rename from neutron/tests/unit/nicira/test_nsx_utils.py
rename to neutron/tests/unit/vmware/test_nsx_utils.py
index 8c648908bf23a37fc4c623240ca751eedb1e67e0..deebaa6c5fb530da34937dbf4c49c04cfd239376 100644 (file)
@@ -25,8 +25,8 @@ from neutron.plugins.nicira.common import utils
 from neutron.plugins.nicira import NvpApiClient
 from neutron.plugins.nicira import nvplib
 from neutron.tests import base
-from neutron.tests.unit.nicira import nicira_method
-from neutron.tests.unit.nicira.nsxlib import base as nsx_base
+from neutron.tests.unit.vmware import nsx_method
+from neutron.tests.unit.vmware.nsxlib import base as nsx_base
 
 
 class NsxUtilsTestCase(base.BaseTestCase):
@@ -39,33 +39,33 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # Mock relevant db calls
         # This will allow for avoiding setting up the plugin
         # for creating db entries
-        mock.patch(nicira_method('get_nsx_switch_and_port_id',
-                                 module_name='dbexts.nicira_db'),
+        mock.patch(nsx_method('get_nsx_switch_and_port_id',
+                              module_name='dbexts.nicira_db'),
                    return_value=ret_value).start()
-        mock.patch(nicira_method('add_neutron_nsx_port_mapping',
-                                 module_name='dbexts.nicira_db')).start()
-        mock.patch(nicira_method('delete_neutron_nsx_port_mapping',
-                                 module_name='dbexts.nicira_db')).start()
+        mock.patch(nsx_method('add_neutron_nsx_port_mapping',
+                              module_name='dbexts.nicira_db')).start()
+        mock.patch(nsx_method('delete_neutron_nsx_port_mapping',
+                              module_name='dbexts.nicira_db')).start()
 
     def _mock_network_mapping_db_calls(self, ret_value):
         # Mock relevant db calls
         # This will allow for avoiding setting up the plugin
         # for creating db entries
-        mock.patch(nicira_method('get_nsx_switch_ids',
-                                 module_name='dbexts.nicira_db'),
+        mock.patch(nsx_method('get_nsx_switch_ids',
+                              module_name='dbexts.nicira_db'),
                    return_value=ret_value).start()
-        mock.patch(nicira_method('add_neutron_nsx_network_mapping',
-                                 module_name='dbexts.nicira_db')).start()
+        mock.patch(nsx_method('add_neutron_nsx_network_mapping',
+                              module_name='dbexts.nicira_db')).start()
 
     def _mock_router_mapping_db_calls(self, ret_value):
         # Mock relevant db calls
         # This will allow for avoiding setting up the plugin
         # for creating db entries
-        mock.patch(nicira_method('get_nsx_router_id',
-                                 module_name='dbexts.nicira_db'),
+        mock.patch(nsx_method('get_nsx_router_id',
+                              module_name='dbexts.nicira_db'),
                    return_value=ret_value).start()
-        mock.patch(nicira_method('add_neutron_nsx_router_mapping',
-                                 module_name='dbexts.nicira_db')).start()
+        mock.patch(nsx_method('add_neutron_nsx_router_mapping',
+                              module_name='dbexts.nicira_db')).start()
 
     def _verify_get_nsx_switch_and_port_id(self, exp_ls_uuid, exp_lp_uuid):
         # The nvplib and db calls are  mocked, therefore the cluster
@@ -107,8 +107,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         exp_lp_uuid = uuidutils.generate_uuid()
         ret_value = None, exp_lp_uuid
         self._mock_port_mapping_db_calls(ret_value)
-        with mock.patch(nicira_method('query_lswitch_lports',
-                                      module_name='nsxlib.switch'),
+        with mock.patch(nsx_method('query_lswitch_lports',
+                                   module_name='nsxlib.switch'),
                         return_value=[{'uuid': exp_lp_uuid,
                                        '_relations': {
                                            'LogicalSwitchConfig': {
@@ -123,8 +123,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         exp_lp_uuid = uuidutils.generate_uuid()
         ret_value = None, None
         self._mock_port_mapping_db_calls(ret_value)
-        with mock.patch(nicira_method('query_lswitch_lports',
-                                      module_name='nsxlib.switch'),
+        with mock.patch(nsx_method('query_lswitch_lports',
+                                   module_name='nsxlib.switch'),
                         return_value=[{'uuid': exp_lp_uuid,
                                        '_relations': {
                                            'LogicalSwitchConfig': {
@@ -137,8 +137,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # mappings are not found both in the db and the backend
         ret_value = None, None
         self._mock_port_mapping_db_calls(ret_value)
-        with mock.patch(nicira_method('query_lswitch_lports',
-                                      module_name='nsxlib.switch'),
+        with mock.patch(nsx_method('query_lswitch_lports',
+                                   module_name='nsxlib.switch'),
                         return_value=[]):
             self._verify_get_nsx_switch_and_port_id(None, None)
 
@@ -154,8 +154,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # found for a given network identifier
         exp_ls_uuids = [uuidutils.generate_uuid()]
         self._mock_network_mapping_db_calls(None)
-        with mock.patch(nicira_method('get_lswitches',
-                                      module_name='nsxlib.switch'),
+        with mock.patch(nsx_method('get_lswitches',
+                                   module_name='nsxlib.switch'),
                         return_value=[{'uuid': uuid}
                                       for uuid in exp_ls_uuids]):
             self._verify_get_nsx_switch_ids(exp_ls_uuids)
@@ -164,8 +164,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # This test verifies that the function returns None if the mappings
         # are not found both in the db and in the backend
         self._mock_network_mapping_db_calls(None)
-        with mock.patch(nicira_method('get_lswitches',
-                                      module_name='nsxlib.switch'),
+        with mock.patch(nsx_method('get_lswitches',
+                                   module_name='nsxlib.switch'),
                         return_value=[]):
             self._verify_get_nsx_switch_ids(None)
 
@@ -181,8 +181,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # found for a given port identifier
         exp_lr_uuid = uuidutils.generate_uuid()
         self._mock_router_mapping_db_calls(None)
-        with mock.patch(nicira_method('query_lrouters',
-                                      module_name='nsxlib.router'),
+        with mock.patch(nsx_method('query_lrouters',
+                                   module_name='nsxlib.router'),
                         return_value=[{'uuid': exp_lr_uuid}]):
             self._verify_get_nsx_router_id(exp_lr_uuid)
 
@@ -190,8 +190,8 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # This test verifies that the function returns None if the mapping
         # are not found both in the db and in the backend
         self._mock_router_mapping_db_calls(None)
-        with mock.patch(nicira_method('query_lrouters',
-                                      module_name='nsxlib.router'),
+        with mock.patch(nsx_method('query_lrouters',
+                                   module_name='nsxlib.router'),
                         return_value=[]):
             self._verify_get_nsx_router_id(None)
 
similarity index 99%
rename from neutron/tests/unit/nicira/test_vcns_driver.py
rename to neutron/tests/unit/vmware/test_vcns_driver.py
index 952fdff9718dd1f42a8ae96b4184c8bf6962a841..9ed11466dec03151ce242f3c8588b42ae8428368 100644 (file)
@@ -27,9 +27,9 @@ from neutron.plugins.nicira.vshield.tasks.constants import TaskStatus
 from neutron.plugins.nicira.vshield.tasks import tasks as ts
 from neutron.plugins.nicira.vshield import vcns_driver
 from neutron.tests import base
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import VCNS_NAME
-from neutron.tests.unit.nicira.vshield import fake_vcns
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import VCNS_NAME
+from neutron.tests.unit.vmware.vshield import fake_vcns
 
 VCNS_CONFIG_FILE = get_fake_conf("vcns.ini.test")
 
similarity index 99%
rename from neutron/tests/unit/nicira/vshield/test_firewall_driver.py
rename to neutron/tests/unit/vmware/vshield/test_firewall_driver.py
index 26705dd3ca5b9be0c1d1de95ac738e87992d94b9..cd6764b8191415412b2ebd0e8afa24f11c5b0d8b 100644 (file)
@@ -27,9 +27,9 @@ from neutron.openstack.common import uuidutils
 from neutron.plugins.nicira.vshield.common import exceptions as vcns_exc
 from neutron.plugins.nicira.vshield import vcns_driver
 from neutron.tests.unit.db.firewall import test_db_firewall
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import VCNS_NAME
-from neutron.tests.unit.nicira.vshield import fake_vcns
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import VCNS_NAME
+from neutron.tests.unit.vmware.vshield import fake_vcns
 
 
 _uuid = uuidutils.generate_uuid
similarity index 98%
rename from neutron/tests/unit/nicira/vshield/test_loadbalancer_driver.py
rename to neutron/tests/unit/vmware/vshield/test_loadbalancer_driver.py
index 40a3d5ccac1248288e72fe64a83c6acc891e4dc8..ff5ba692dfb1df4634230c3ffaf5b58bcbdff587 100644 (file)
@@ -27,9 +27,9 @@ from neutron.plugins.nicira.vshield import (
 from neutron.plugins.nicira.vshield.common import (
     exceptions as vcns_exc)
 from neutron.tests.unit.db.loadbalancer import test_db_loadbalancer
-from neutron.tests.unit.nicira import get_fake_conf
-from neutron.tests.unit.nicira import VCNS_NAME
-from neutron.tests.unit.nicira.vshield import fake_vcns
+from neutron.tests.unit.vmware import get_fake_conf
+from neutron.tests.unit.vmware import VCNS_NAME
+from neutron.tests.unit.vmware.vshield import fake_vcns
 
 _uuid = uuidutils.generate_uuid
 
index 839159fb9260375500956b62104d1e0a8c5f195c..27f70b6e0e63de51526291bf67a88b3d95e8cba0 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -136,6 +136,7 @@ neutron.core_plugins =
     openvswitch = neutron.plugins.openvswitch.ovs_neutron_plugin:OVSNeutronPluginV2
     plumgrid = neutron.plugins.plumgrid.plumgrid_plugin.plumgrid_plugin:NeutronPluginPLUMgridV2
     ryu = neutron.plugins.ryu.ryu_neutron_plugin:RyuNeutronPluginV2
+    vmware = neutron.plugins.vmware.plugin:NsxPlugin
 neutron.service_plugins =
     dummy = neutron.tests.unit.dummy_plugin:DummyServicePlugin
     router = neutron.services.l3_router.l3_router_plugin:L3RouterPlugin