Final decomposition of ML2 Nexus Driver

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
This commit is contained in:
Carol Bouchard 2015-08-14 13:39:45 -04:00 committed by Sandhya Dasu
parent e0bc5239e0
commit 14e6708782
8 changed files with 4 additions and 140 deletions

View 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',

View 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

View File

@ -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

View File

@ -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)

View File

@ -1 +0,0 @@
networking-cisco

View File

@ -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

View File

@ -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