]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Final decomposition of ML2 Nexus Driver
authorCarol Bouchard <caboucha@cisco.com>
Fri, 14 Aug 2015 17:39:45 +0000 (13:39 -0400)
committerSandhya Dasu <sadasu@cisco.com>
Tue, 18 Aug 2015 15:41:22 +0000 (15:41 +0000)
This changeset removes the remaining ML2 Nexus Driver Vendor
code from the neutron repo.  It has been moved to  the
networking-cisco repo.

Change-Id: I95540f35f80ad8eba4bc3f6fa37095842e42c037
Closes-bug:  #1482366
Implements:  blueprint: core-vendor-decomposition

neutron/db/migration/alembic_migrations/external.py
neutron/db/migration/models/head.py
neutron/plugins/ml2/drivers/cisco/nexus/__init__.py [deleted file]
neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py [deleted file]
neutron/plugins/ml2/drivers/cisco/nexus/nexus_models_v2.py [deleted file]
neutron/plugins/ml2/drivers/cisco/nexus/requirements.txt [deleted file]
neutron/plugins/ml2/drivers/cisco/nexus/type_nexus_vxlan.py [deleted file]
setup.cfg

index 7bd9ae81a1a9163a2f0f974c85358ac667e219a1..267db137ce27d945766bea779461b688d84d20c6 100644 (file)
@@ -40,6 +40,10 @@ DRIVER_TABLES = [
     'cisco_ml2_n1kv_vxlan_allocations',
     'cisco_ml2_n1kv_vlan_allocations',
     'cisco_ml2_n1kv_profile_bindings',
+    'cisco_ml2_nexusport_bindings',
+    'cisco_ml2_nexus_nve',
+    'ml2_nexus_vxlan_allocations',
+    'ml2_nexus_vxlan_mcast_groups',
     # VMware-NSX models moved to openstack/vmware-nsx
     'tz_network_bindings',
     'neutron_nsx_network_mappings',
index 75d7242bbb27e7a53a4d803839c367f485451ba9..5eb02213cdbcb59f1ff4f02f050b5376396d2a43 100644 (file)
@@ -55,8 +55,6 @@ from neutron.plugins.cisco.db import n1kv_models_v2  # noqa
 from neutron.plugins.cisco.db import network_models_v2  # noqa
 from neutron.plugins.ml2.drivers.brocade.db import (  # noqa
     models as ml2_brocade_models)
-from neutron.plugins.ml2.drivers.cisco.nexus import (  # noqa
-    nexus_models_v2 as ml2_nexus_models_v2)
 from neutron.plugins.ml2.drivers.cisco.ucsm import ucsm_model  # noqa
 from neutron.plugins.ml2.drivers import type_flat  # noqa
 from neutron.plugins.ml2.drivers import type_gre  # noqa
diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/__init__.py b/neutron/plugins/ml2/drivers/cisco/nexus/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py b/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py
deleted file mode 100644 (file)
index fac9503..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2013 OpenStack Foundation
-# 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
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-"""
-ML2 Mechanism Driver for Cisco Nexus platforms.
-"""
-
-from networking_cisco.plugins.ml2.drivers.cisco.nexus import mech_cisco_nexus
-
-
-class CiscoNexusMechanismDriver(mech_cisco_nexus.CiscoNexusMechanismDriver):
-    pass
diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/nexus_models_v2.py b/neutron/plugins/ml2/drivers/cisco/nexus/nexus_models_v2.py
deleted file mode 100644 (file)
index 045499c..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright (c) 2013 OpenStack Foundation
-# 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
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    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 sqlalchemy as sa
-
-from neutron.db import model_base
-from neutron.db import models_v2
-
-
-class NexusPortBinding(model_base.BASEV2):
-    """Represents a binding of VM's to nexus ports."""
-
-    __tablename__ = "cisco_ml2_nexusport_bindings"
-
-    binding_id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
-    port_id = sa.Column(sa.String(255))
-    vlan_id = sa.Column(sa.Integer, nullable=False)
-    vni = sa.Column(sa.Integer)
-    switch_ip = sa.Column(sa.String(255))
-    instance_id = sa.Column(sa.String(255))
-    is_provider_vlan = sa.Column(sa.Boolean(), nullable=False, default=False,
-                           server_default=sa.sql.false())
-
-    def __repr__(self):
-        """Just the binding, without the id key."""
-        return ("<NexusPortBinding(%s,%s,%s,%s, %s, %s)>" %
-                (self.port_id, self.vlan_id, self.vni, self.switch_ip,
-                 self.instance_id,
-                 'True' if self.is_provider_vlan else 'False'))
-
-    def __eq__(self, other):
-        """Compare only the binding, without the id key."""
-        return (
-            self.port_id == other.port_id and
-            self.vlan_id == other.vlan_id and
-            self.vni == other.vni and
-            self.switch_ip == other.switch_ip and
-            self.instance_id == other.instance_id and
-            self.is_provider_vlan == other.is_provider_vlan
-        )
-
-
-class NexusNVEBinding(model_base.BASEV2):
-    """Represents Network Virtualization Endpoint configuration."""
-
-    __tablename__ = "cisco_ml2_nexus_nve"
-
-    vni = sa.Column(sa.Integer, primary_key=True, nullable=False)
-    device_id = sa.Column(sa.String(255), primary_key=True)
-    switch_ip = sa.Column(sa.String(255), primary_key=True)
-    mcast_group = sa.Column(sa.String(255))
-
-    def __repr__(self):
-        return ("<NexusNVEBinding(%s,%s,%s,%s)>" %
-                (self.vni, self.switch_ip, self.device_id, self.mcast_group))
-
-
-class NexusVxlanAllocation(model_base.BASEV2):
-
-    __tablename__ = 'ml2_nexus_vxlan_allocations'
-
-    vxlan_vni = sa.Column(sa.Integer, nullable=False, primary_key=True,
-                          autoincrement=False)
-    allocated = sa.Column(sa.Boolean, nullable=False, default=False,
-                          server_default=sa.sql.false())
-
-
-class NexusMcastGroup(model_base.BASEV2, models_v2.HasId):
-
-    __tablename__ = 'ml2_nexus_vxlan_mcast_groups'
-
-    mcast_group = sa.Column(sa.String(64), nullable=False)
-    associated_vni = sa.Column(sa.Integer,
-                               sa.ForeignKey(
-                                   'ml2_nexus_vxlan_allocations.vxlan_vni',
-                                   ondelete="CASCADE"),
-                               nullable=False)
diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/requirements.txt b/neutron/plugins/ml2/drivers/cisco/nexus/requirements.txt
deleted file mode 100644 (file)
index ef631a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-networking-cisco
diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/type_nexus_vxlan.py b/neutron/plugins/ml2/drivers/cisco/nexus/type_nexus_vxlan.py
deleted file mode 100644 (file)
index 933b1e3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright (c) 2015 Cisco Systems 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
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-#
-
-from networking_cisco.plugins.ml2.drivers.cisco.nexus import type_nexus_vxlan
-
-
-class NexusVxlanTypeDriver(type_nexus_vxlan.NexusVxlanTypeDriver):
-    pass
index 8235ce3b4f16ac01bce03a6675ed54747dcdfdc4..7a0a1d29befed98bfadcabfb5e9585ae1ba1838d 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -158,7 +158,6 @@ neutron.ml2.type_drivers =
     vlan = neutron.plugins.ml2.drivers.type_vlan:VlanTypeDriver
     gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver
     vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriver
-    nexus_vxlan = neutron.plugins.ml2.drivers.cisco.nexus.type_nexus_vxlan:NexusVxlanTypeDriver
 neutron.ml2.mechanism_drivers =
     ovsvapp = neutron.plugins.ml2.drivers.ovsvapp.mech_driver:OVSvAppAgentMechanismDriver
     opendaylight = neutron.plugins.ml2.drivers.opendaylight.driver:OpenDaylightMechanismDriver
@@ -167,7 +166,6 @@ neutron.ml2.mechanism_drivers =
     linuxbridge = neutron.plugins.ml2.drivers.linuxbridge.mech_driver.mech_linuxbridge:LinuxbridgeMechanismDriver
     openvswitch = neutron.plugins.ml2.drivers.openvswitch.mech_driver.mech_openvswitch:OpenvswitchMechanismDriver
     hyperv = neutron.plugins.ml2.drivers.hyperv.mech_hyperv:HypervMechanismDriver
-    cisco_nexus = neutron.plugins.ml2.drivers.cisco.nexus.mech_cisco_nexus:CiscoNexusMechanismDriver
     cisco_ucsm = neutron.plugins.ml2.drivers.cisco.ucsm.mech_cisco_ucsm:CiscoUcsmMechanismDriver
     l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver
     ofagent = neutron.plugins.ml2.drivers.ofagent.driver:OfagentMechanismDriver