+++ /dev/null
-Neutron ML2 Cisco Mechanism Drivers README
-
-Cisco mechanism drivers implement the ML2 driver APIs for managing
-Cisco devices.
-
-Notes:
-The initial version of the Cisco Nexus driver supports only the
-VLAN network type on a single physical network.
-
-Provider networks are not currently supported.
-
-The Cisco Nexus mechanism driver's database may have duplicate entries also
-found in the core ML2 database. Since the Cisco Nexus DB code is a port from
-the plugins/cisco implementation this duplication will remain until the
-plugins/cisco code is deprecated.
-
-
-For more details on using Cisco Nexus switches under ML2 please refer to:
-http://wiki.openstack.org/wiki/Neutron/ML2/MechCiscoNexus
--- /dev/null
+Neutron ML2 Cisco Nexus Mechanism Driver README
+
+
+Notes:
+
+The initial version of this driver supports only a single physical
+network.
+
+For provider networks, extended configuration options are not
+currently supported.
+
+This driver's database may have duplicate entries also found in the
+core ML2 database. Since the Cisco Nexus DB code is a port from the
+plugins/cisco implementation this duplication will remain until the
+plugins/cisco code is deprecated.
+
+
+For more details on using Cisco Nexus switches under ML2 please refer to:
+http://wiki.openstack.org/wiki/Neutron/ML2/MechCiscoNexus
#
-# Attachment attributes
-INSTANCE_ID = 'instance_id'
-TENANT_ID = 'tenant_id'
-TENANT_NAME = 'tenant_name'
-HOST_NAME = 'host_name'
-
-# Network attributes
-NET_ID = 'id'
-NET_NAME = 'name'
-NET_VLAN_ID = 'vlan_id'
-NET_VLAN_NAME = 'vlan_name'
-NET_PORTS = 'ports'
-
-# Network types
-NETWORK_TYPE_FLAT = 'flat'
-NETWORK_TYPE_LOCAL = 'local'
-NETWORK_TYPE_VLAN = 'vlan'
-NETWORK_TYPE_NONE = 'none'
-
CREDENTIAL_USERNAME = 'user_name'
CREDENTIAL_PASSWORD = 'password'
PASSWORD = 'password'
NETWORK_ADMIN = 'network_admin'
-
-NETWORK = 'network'
-PORT = 'port'
-CONTEXT = 'context'
-SUBNET = 'subnet'
# under the License.
#
-from neutron.plugins.ml2.drivers.cisco import config as config
-from neutron.plugins.ml2.drivers.cisco import constants as const
-from neutron.plugins.ml2.drivers.cisco import exceptions as cexc
-from neutron.plugins.ml2.drivers.cisco import network_db_v2 as cdb
+from neutron.plugins.ml2.drivers.cisco.nexus import config
+from neutron.plugins.ml2.drivers.cisco.nexus import constants as const
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as cexc
+from neutron.plugins.ml2.drivers.cisco.nexus import network_db_v2 as cdb
TENANT = const.NETWORK_ADMIN
# License for the specific language governing permissions and limitations
# under the License.
-"""Exceptions used by Cisco ML2 mechanism drivers."""
+"""Exceptions used by Cisco Nexus ML2 mechanism driver."""
from neutron.common import exceptions
from neutron.common import constants as n_const
from neutron.extensions import portbindings
from neutron.openstack.common import log as logging
+from neutron.plugins.common import constants as p_const
from neutron.plugins.ml2 import driver_api as api
-from neutron.plugins.ml2.drivers.cisco import config as conf
-from neutron.plugins.ml2.drivers.cisco import credentials_v2 as cred
-from neutron.plugins.ml2.drivers.cisco import exceptions as excep
-from neutron.plugins.ml2.drivers.cisco import nexus_db_v2 as nxos_db
-from neutron.plugins.ml2.drivers.cisco import nexus_network_driver
+from neutron.plugins.ml2.drivers.cisco.nexus import config as conf
+from neutron.plugins.ml2.drivers.cisco.nexus import credentials_v2 as cred
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as excep
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_db_v2 as nxos_db
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_network_driver
LOG = logging.getLogger(__name__)
def _get_vlanid(self, context):
segment = context.bound_segment
- if (segment and segment[api.NETWORK_TYPE] == 'vlan' and
+ if (segment and segment[api.NETWORK_TYPE] == p_const.TYPE_VLAN and
self._valid_network_segment(segment)):
return context.bound_segment.get(api.SEGMENTATION_ID)
from neutron.db import api as db
from neutron.openstack.common import log as logging
from neutron.openstack.common import uuidutils
-from neutron.plugins.ml2.drivers.cisco import exceptions as c_exc
-from neutron.plugins.ml2.drivers.cisco import network_models_v2
-from neutron.plugins.ml2.drivers.cisco import nexus_models_v2 # noqa
+from neutron.plugins.ml2.drivers.cisco.nexus import constants as const
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as c_exc
+from neutron.plugins.ml2.drivers.cisco.nexus import network_models_v2
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_models_v2 # noqa
LOG = logging.getLogger(__name__)
filter_by(tenant_id=tenant_id).
filter_by(credential_id=credential_id).one())
if new_user_name:
- cred["user_name"] = new_user_name
+ cred[const.CREDENTIAL_USERNAME] = new_user_name
if new_password:
- cred["password"] = new_password
+ cred[const.CREDENTIAL_PASSWORD] = new_password
session.merge(cred)
session.flush()
return cred
import neutron.db.api as db
from neutron.openstack.common import log as logging
-from neutron.plugins.ml2.drivers.cisco import exceptions as c_exc
-from neutron.plugins.ml2.drivers.cisco import nexus_models_v2
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as c_exc
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_models_v2
LOG = logging.getLogger(__name__)
from neutron.openstack.common import excutils
from neutron.openstack.common import importutils
from neutron.openstack.common import log as logging
-from neutron.plugins.ml2.drivers.cisco import config as conf
-from neutron.plugins.ml2.drivers.cisco import constants as const
-from neutron.plugins.ml2.drivers.cisco import credentials_v2 as cred
-from neutron.plugins.ml2.drivers.cisco import exceptions as cexc
-from neutron.plugins.ml2.drivers.cisco import nexus_db_v2
-from neutron.plugins.ml2.drivers.cisco import nexus_snippets as snipp
+from neutron.plugins.ml2.drivers.cisco.nexus import config as conf
+from neutron.plugins.ml2.drivers.cisco.nexus import constants as const
+from neutron.plugins.ml2.drivers.cisco.nexus import credentials_v2 as cred
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as cexc
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_db_v2
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_snippets as snipp
LOG = logging.getLogger(__name__)
from neutron.manager import NeutronManager
from neutron.openstack.common import log as logging
from neutron.plugins.ml2 import config as ml2_config
-from neutron.plugins.ml2.drivers.cisco import config as cisco_config
-from neutron.plugins.ml2.drivers.cisco import exceptions as c_exc
-from neutron.plugins.ml2.drivers.cisco import mech_cisco_nexus
-from neutron.plugins.ml2.drivers.cisco import nexus_network_driver
+from neutron.plugins.ml2.drivers.cisco.nexus import config as cisco_config
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as c_exc
+from neutron.plugins.ml2.drivers.cisco.nexus import mech_cisco_nexus
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_network_driver
from neutron.plugins.ml2.drivers import type_vlan as vlan_config
from neutron.tests.unit import test_db_plugin
import testtools
from neutron.db import api as db
-from neutron.plugins.ml2.drivers.cisco import exceptions
-from neutron.plugins.ml2.drivers.cisco import network_db_v2
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions
+from neutron.plugins.ml2.drivers.cisco.nexus import network_db_v2
from neutron.tests import base
from neutron.extensions import portbindings
from neutron.openstack.common import importutils
from neutron.plugins.ml2 import driver_api as api
-from neutron.plugins.ml2.drivers.cisco import constants
-from neutron.plugins.ml2.drivers.cisco import exceptions
-from neutron.plugins.ml2.drivers.cisco import mech_cisco_nexus
-from neutron.plugins.ml2.drivers.cisco import nexus_db_v2
-from neutron.plugins.ml2.drivers.cisco import nexus_network_driver
+from neutron.plugins.ml2.drivers.cisco.nexus import constants
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions
+from neutron.plugins.ml2.drivers.cisco.nexus import mech_cisco_nexus
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_db_v2
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_network_driver
from neutron.tests import base
NEXUS_SSH_PORT = '22'
PORT_STATE = n_const.PORT_STATUS_ACTIVE
NETWORK_TYPE = 'vlan'
-NEXUS_DRIVER = ('neutron.plugins.ml2.drivers.cisco.'
+NEXUS_DRIVER = ('neutron.plugins.ml2.drivers.cisco.nexus.'
'nexus_network_driver.CiscoNexusDriver')
import testtools
from neutron.db import api as db
-from neutron.plugins.ml2.drivers.cisco import exceptions
-from neutron.plugins.ml2.drivers.cisco import nexus_db_v2
+from neutron.plugins.ml2.drivers.cisco.nexus import exceptions
+from neutron.plugins.ml2.drivers.cisco.nexus import nexus_db_v2
from neutron.tests import base
hyperv = neutron.plugins.ml2.drivers.mech_hyperv:HypervMechanismDriver
ncs = neutron.plugins.ml2.drivers.mechanism_ncs:NCSMechanismDriver
arista = neutron.plugins.ml2.drivers.mech_arista.mechanism_arista:AristaDriver
- cisco_nexus = neutron.plugins.ml2.drivers.cisco.mech_cisco_nexus:CiscoNexusMechanismDriver
+ cisco_nexus = neutron.plugins.ml2.drivers.cisco.nexus.mech_cisco_nexus:CiscoNexusMechanismDriver
l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver
bigswitch = neutron.plugins.ml2.drivers.mech_bigswitch.driver:BigSwitchMechanismDriver