]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Move NCS mech driver to its new home
authorHenry Gessau <gessau@cisco.com>
Sat, 31 Jan 2015 17:57:49 +0000 (12:57 -0500)
committerHenry Gessau <gessau@cisco.com>
Wed, 11 Feb 2015 21:57:33 +0000 (16:57 -0500)
The NCS driver is scheduled for decomposition, and in the targetted vendor repo
the files are in a new location in the tree. Before we can decompose the driver
we must move it to its new location in the neutron tree.

A future patch will decompose (thin) the driver and add requirements.txt.

Partial-Bug: #1416713
Partially Implements: blueprint core-vendor-decomposition

Change-Id: If9d098bbbd571f53f945122e007d12d561295546

neutron/plugins/ml2/README
neutron/plugins/ml2/drivers/cisco/ncs/__init__.py [new file with mode: 0644]
neutron/plugins/ml2/drivers/cisco/ncs/driver.py [moved from neutron/plugins/ml2/drivers/mechanism_ncs.py with 100% similarity]
neutron/plugins/ml2/drivers/opendaylight/driver.py
neutron/tests/unit/ml2/drivers/cisco/ncs/__init__.py [new file with mode: 0644]
neutron/tests/unit/ml2/drivers/cisco/ncs/test_mechanism_ncs.py [moved from neutron/tests/unit/ml2/test_mechanism_ncs.py with 92% similarity]
setup.cfg

index 4dce789cb195edfb58818d29b604b84c25d26c3c..74f96f6f1f4192db30690f48911dbc1449f48ac4 100644 (file)
@@ -44,8 +44,8 @@ also called as part of the port binding process, to determine whether
 the associated mechanism can provide connectivity for the network, and
 if so, the network segment and VIF driver to be used. The havana
 release includes mechanism drivers for the Open vSwitch, Linux bridge,
-and Hyper-V L2 agents, for Arista and Cisco switches, and for the
-Tail-f NCS. It also includes an L2 Population mechanism driver that
+and Hyper-V L2 agents, and for vendor switches/controllers/etc.
+It also includes an L2 Population mechanism driver that
 can help optimize tunneled virtual network traffic.
 
 For additional information regarding the ML2 plugin and its collection
diff --git a/neutron/plugins/ml2/drivers/cisco/ncs/__init__.py b/neutron/plugins/ml2/drivers/cisco/ncs/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
index 3c6f89ee003e64fda9dbb989e7a923b4bf3d5bbf..0342be3617fc8fa5732d268e1a557800d200410f 100644 (file)
@@ -45,7 +45,7 @@ class OpenDaylightMechanismDriver(api.MechanismDriver):
 
     """Mechanism Driver for OpenDaylight.
 
-    This driver was a port from the Tail-F NCS MechanismDriver.  The API
+    This driver was a port from the NCS MechanismDriver.  The API
     exposed by ODL is slightly different from the API exposed by NCS,
     but the general concepts are the same.
     """
diff --git a/neutron/tests/unit/ml2/drivers/cisco/ncs/__init__.py b/neutron/tests/unit/ml2/drivers/cisco/ncs/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
similarity index 92%
rename from neutron/tests/unit/ml2/test_mechanism_ncs.py
rename to neutron/tests/unit/ml2/drivers/cisco/ncs/test_mechanism_ncs.py
index 6c40a168554e0c7aa8ae5268e6936cb684bda650..7aa99035825be54df341980cec4c60bbb45f9b52 100644 (file)
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from neutron.plugins.ml2.drivers import mechanism_ncs
+from neutron.plugins.ml2.drivers.cisco.ncs import driver
 from neutron.tests.unit.ml2 import test_ml2_plugin as test_plugin
 
 
@@ -26,7 +26,7 @@ class NCSTestCase(test_plugin.Ml2PluginV2TestCase):
         # driver apis.
         super(NCSTestCase, self).setUp()
         self.port_create_status = 'DOWN'
-        mechanism_ncs.NCSMechanismDriver.sendjson = self.check_sendjson
+        driver.NCSMechanismDriver.sendjson = self.check_sendjson
 
     def check_sendjson(self, method, urlpath, obj):
         # Confirm fix for bug #1224981
index da01f948266e1bded348fe7926a4fbf18c7b9d11..0a60ec4ee06662035c515fac9d55934b78843aa4 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -169,8 +169,11 @@ neutron.ml2.mechanism_drivers =
     linuxbridge = neutron.plugins.ml2.drivers.mech_linuxbridge:LinuxbridgeMechanismDriver
     openvswitch = neutron.plugins.ml2.drivers.mech_openvswitch:OpenvswitchMechanismDriver
     hyperv = neutron.plugins.ml2.drivers.mech_hyperv:HypervMechanismDriver
-    ncs = neutron.plugins.ml2.drivers.mechanism_ncs:NCSMechanismDriver
     arista = neutron.plugins.ml2.drivers.arista.mechanism_arista:AristaDriver
+    # Note: ncs and cisco_ncs point to the same driver entrypoint
+    # TODO: The old name (ncs) can be dropped when it is no longer used
+    ncs = neutron.plugins.ml2.drivers.cisco.ncs.driver:NCSMechanismDriver
+    cisco_ncs = neutron.plugins.ml2.drivers.cisco.ncs.driver:NCSMechanismDriver
     cisco_nexus = neutron.plugins.ml2.drivers.cisco.nexus.mech_cisco_nexus:CiscoNexusMechanismDriver
     cisco_apic = neutron.plugins.ml2.drivers.cisco.apic.mechanism_apic:APICMechanismDriver
     l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver