From 453994f57eaf9badc3ee5caa7f4b4772fbf41b6f Mon Sep 17 00:00:00 2001 From: Shih-Hao Li Date: Tue, 15 Sep 2015 15:53:58 -0700 Subject: [PATCH] Divide vmware_nsx/services into plugin-specific subdirectories This patch will create: vmware_nsx/services/common for common plugin files vmware_nsx/services/nsx_v3 for nsx_v3 specific plugin files This is part of new vmware_nsx directory structure proposed in https://goo.gl/GdWXyH. Change-Id: I30753aef1c06e2a1b15d336e1d661f3b44ea669e --- etc/nsx.ini | 2 +- setup.cfg | 2 +- vmware_nsx/services/l2gateway/common/__init__.py | 0 vmware_nsx/services/l2gateway/{ => common}/plugin.py | 0 vmware_nsx/services/l2gateway/nsx_v3/__init__.py | 0 .../l2gateway/{nsx_v3_driver.py => nsx_v3/driver.py} | 0 .../unit/vmware/services/l2gateway/test_nsxv3_driver.py | 8 ++++---- 7 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 vmware_nsx/services/l2gateway/common/__init__.py rename vmware_nsx/services/l2gateway/{ => common}/plugin.py (100%) create mode 100644 vmware_nsx/services/l2gateway/nsx_v3/__init__.py rename vmware_nsx/services/l2gateway/{nsx_v3_driver.py => nsx_v3/driver.py} (100%) diff --git a/etc/nsx.ini b/etc/nsx.ini index 5e07b0e7ea..fc3308afea 100644 --- a/etc/nsx.ini +++ b/etc/nsx.ini @@ -227,7 +227,7 @@ # Specify the class path for the Layer 2 gateway backend driver(i.e. NSXv3/NSX-V). # This field will be used when a L2 Gateway service plugin is configured. -# nsx_l2gw_driver = vmware_nsx.services.l2gateway.nsx_v3_driver.NsxV3Driver +# nsx_l2gw_driver = vmware_nsx.services.l2gateway.nsx_v3.driver.NsxV3Driver [nsx_sync] # Interval in seconds between runs of the status synchronization task. diff --git a/setup.cfg b/setup.cfg index 92b74c27e9..d08285d1c9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ neutron.db.alembic_migrations = neutron.core_plugins = vmware = vmware_nsx.plugin:NsxMhPlugin neutron.service_plugins = - vmware_nsx_l2gw = vmware_nsx.services.l2gateway.plugin:NsxL2GatewayPlugin + vmware_nsx_l2gw = vmware_nsx.services.l2gateway.common.plugin:NsxL2GatewayPlugin vmware_nsx_qos = vmware_nsx.services.qos.plugin:NsxQosPlugin vmware_nsx.neutron.nsxv.router_type_drivers = shared = vmware_nsx.plugins.nsx_v_drivers.shared_router_driver:RouterSharedDriver diff --git a/vmware_nsx/services/l2gateway/common/__init__.py b/vmware_nsx/services/l2gateway/common/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vmware_nsx/services/l2gateway/plugin.py b/vmware_nsx/services/l2gateway/common/plugin.py similarity index 100% rename from vmware_nsx/services/l2gateway/plugin.py rename to vmware_nsx/services/l2gateway/common/plugin.py diff --git a/vmware_nsx/services/l2gateway/nsx_v3/__init__.py b/vmware_nsx/services/l2gateway/nsx_v3/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vmware_nsx/services/l2gateway/nsx_v3_driver.py b/vmware_nsx/services/l2gateway/nsx_v3/driver.py similarity index 100% rename from vmware_nsx/services/l2gateway/nsx_v3_driver.py rename to vmware_nsx/services/l2gateway/nsx_v3/driver.py diff --git a/vmware_nsx/tests/unit/vmware/services/l2gateway/test_nsxv3_driver.py b/vmware_nsx/tests/unit/vmware/services/l2gateway/test_nsxv3_driver.py index b4c6c93c03..df29947a28 100644 --- a/vmware_nsx/tests/unit/vmware/services/l2gateway/test_nsxv3_driver.py +++ b/vmware_nsx/tests/unit/vmware/services/l2gateway/test_nsxv3_driver.py @@ -19,15 +19,15 @@ from neutron.tests import base from networking_l2gw.tests.unit.db import test_l2gw_db -from vmware_nsx.services.l2gateway import nsx_v3_driver -from vmware_nsx.services.l2gateway import plugin as l2gw_plugin +from vmware_nsx.services.l2gateway.common import plugin as l2gw_plugin +from vmware_nsx.services.l2gateway.nsx_v3 import driver as nsx_v3_driver from oslo_config import cfg from oslo_utils import uuidutils -NSX_V3_DRIVER_CLASS_PATH = ('vmware_nsx.services.l2gateway.' - 'nsx_v3_driver.NsxV3Driver') +NSX_V3_DRIVER_CLASS_PATH = ( + 'vmware_nsx.services.l2gateway.nsx_v3.driver.NsxV3Driver') class TestNsxV3L2GatewayDriver(test_l2gw_db.L2GWTestCase,