From 31ee6f094f54554212616fbb34b3566b40ee9279 Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Sat, 31 Jan 2015 12:57:49 -0500 Subject: [PATCH] Move NCS mech driver to its new home 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 | 4 ++-- neutron/plugins/ml2/drivers/cisco/ncs/__init__.py | 0 .../ml2/drivers/{mechanism_ncs.py => cisco/ncs/driver.py} | 0 neutron/plugins/ml2/drivers/opendaylight/driver.py | 2 +- neutron/tests/unit/ml2/drivers/cisco/ncs/__init__.py | 0 .../unit/ml2/{ => drivers/cisco/ncs}/test_mechanism_ncs.py | 4 ++-- setup.cfg | 5 ++++- 7 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 neutron/plugins/ml2/drivers/cisco/ncs/__init__.py rename neutron/plugins/ml2/drivers/{mechanism_ncs.py => cisco/ncs/driver.py} (100%) create mode 100644 neutron/tests/unit/ml2/drivers/cisco/ncs/__init__.py rename neutron/tests/unit/ml2/{ => drivers/cisco/ncs}/test_mechanism_ncs.py (92%) diff --git a/neutron/plugins/ml2/README b/neutron/plugins/ml2/README index 4dce789cb19..74f96f6f1f4 100644 --- a/neutron/plugins/ml2/README +++ b/neutron/plugins/ml2/README @@ -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 index 00000000000..e69de29bb2d diff --git a/neutron/plugins/ml2/drivers/mechanism_ncs.py b/neutron/plugins/ml2/drivers/cisco/ncs/driver.py similarity index 100% rename from neutron/plugins/ml2/drivers/mechanism_ncs.py rename to neutron/plugins/ml2/drivers/cisco/ncs/driver.py diff --git a/neutron/plugins/ml2/drivers/opendaylight/driver.py b/neutron/plugins/ml2/drivers/opendaylight/driver.py index 3c6f89ee003..0342be3617f 100644 --- a/neutron/plugins/ml2/drivers/opendaylight/driver.py +++ b/neutron/plugins/ml2/drivers/opendaylight/driver.py @@ -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 index 00000000000..e69de29bb2d diff --git a/neutron/tests/unit/ml2/test_mechanism_ncs.py b/neutron/tests/unit/ml2/drivers/cisco/ncs/test_mechanism_ncs.py 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 6c40a168554..7aa99035825 100644 --- a/neutron/tests/unit/ml2/test_mechanism_ncs.py +++ b/neutron/tests/unit/ml2/drivers/cisco/ncs/test_mechanism_ncs.py @@ -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 diff --git a/setup.cfg b/setup.cfg index da01f948266..0a60ec4ee06 100644 --- 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