diff --git a/etc/neutron/plugins/cisco/cisco_plugins.ini b/etc/neutron/plugins/cisco/cisco_plugins.ini index 44b0131ca10..a5e6e2d9b21 100644 --- a/etc/neutron/plugins/cisco/cisco_plugins.ini +++ b/etc/neutron/plugins/cisco/cisco_plugins.ini @@ -1,30 +1,58 @@ [cisco_plugins] -#nexus_plugin=neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin -#vswitch_plugin=neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 + +# (StrOpt) Period-separated module path to the plugin class to use for +# the Cisco Nexus switches. +# +# nexus_plugin = neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin + +# (StrOpt) Period-separated module path to the plugin class to use for +# the virtual switches on compute nodes. +# +# vswitch_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 + [cisco] -#vlan_start=100 -#vlan_end=3000 -#vlan_name_prefix=q- -#max_ports=100 -#max_port_profiles=65568 -#max_networks=65568 -#model_class=neutron.plugins.cisco.models.virt_phy_sw_v2.VirtualPhysicalSwitchModelV2 -#manager_class=neutron.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr -#nexus_driver=neutron.plugins.cisco.test.nexus.fake_nexus_driver.CiscoNEXUSFakeDriver -#svi_round_robin=False - -# IMPORTANT: Comment out the following two lines for production deployments -[cisco_test] -host=testhost +# (StrOpt) A short prefix to prepend to the VLAN number when creating a +# VLAN interface. For example, if an interface is being created for +# VLAN 2001 it will be named 'q-2001' using the default prefix. # -# Nexus Switch Format. +# vlan_name_prefix = q- +# Example: vlan_name_prefix = vnet- + +# (StrOpt) Period-separated module path to the model class to use for +# the Cisco neutron plugin. +# +# model_class = neutron.plugins.cisco.models.virt_phy_sw_v2.VirtualPhysicalSwitchModelV2 + +# (StrOpt) Period-separated module path to the driver class to use for +# the Cisco Nexus switches. +# +# If no value is configured, a fake driver will be used. +# nexus_driver = neutron.plugins.cisco.test.nexus.fake_nexus_driver.CiscoNEXUSFakeDriver +# With real hardware, use the CiscoNEXUSDriver class: +# nexus_driver = neutron.plugins.cisco.nexus.cisco_nexus_network_driver_v2.CiscoNEXUSDriver + +# (BoolOpt) A flag to enable round robin scheduling of routers for SVI. +# svi_round_robin = False + + +# Cisco Nexus Switch configurations. +# Each switch to be managed by Openstack Neutron must be configured here. +# +# Cisco Nexus Switch Format. # [NEXUS_SWITCH:] -# = -# ssh_port= -# username= -# password= +# = (1) +# ssh_port= (2) +# username= (3) +# password= (4) +# +# (1) For each host connected to a port on the switch, specify the hostname +# and the Nexus physical port (interface) it is connected to. +# (2) The TCP port for connecting via SSH to manage the switch. This is +# port number 22 unless the switch has been configured otherwise. +# (3) The username for logging into the switch to manage it. +# (4) The password for logging into the switch to manage it. # # Example: # [NEXUS_SWITCH:1.1.1.1] diff --git a/neutron/plugins/cisco/common/config.py b/neutron/plugins/cisco/common/config.py index 30e755164be..e085ae61a09 100644 --- a/neutron/plugins/cisco/common/config.py +++ b/neutron/plugins/cisco/common/config.py @@ -32,28 +32,14 @@ cisco_plugins_opts = [ cisco_opts = [ - cfg.StrOpt('vlan_start', default='100', - help=_("VLAN start value")), - cfg.StrOpt('vlan_end', default='3000', - help=_("VLAN end value")), cfg.StrOpt('vlan_name_prefix', default='q-', help=_("VLAN Name prefix")), - cfg.StrOpt('max_ports', default='100', - help=_("Maximum Port value")), - cfg.StrOpt('max_port_profiles', default='65568', - help=_("Maximum Port Profile value")), - cfg.StrOpt('max_networks', default='65568', - help=_("Maximum Network value")), cfg.BoolOpt('svi_round_robin', default=False, help=_("Distribute SVI interfaces over all switches")), cfg.StrOpt('model_class', default='neutron.plugins.cisco.models.virt_phy_sw_v2.' 'VirtualPhysicalSwitchModelV2', help=_("Model Class")), - cfg.StrOpt('manager_class', - default='neutron.plugins.cisco.segmentation.' - 'l2network_vlan_mgr_v2.L2NetworkVLANMgr', - help=_("Manager Class")), cfg.StrOpt('nexus_driver', default='neutron.plugins.cisco.test.nexus.' 'fake_nexus_driver.CiscoNEXUSFakeDriver', diff --git a/neutron/plugins/cisco/db/network_db_v2.py b/neutron/plugins/cisco/db/network_db_v2.py index b045be0944f..48186848176 100644 --- a/neutron/plugins/cisco/db/network_db_v2.py +++ b/neutron/plugins/cisco/db/network_db_v2.py @@ -21,7 +21,6 @@ from sqlalchemy.orm import exc from neutron.db import api as db from neutron.openstack.common import log as logging from neutron.plugins.cisco.common import cisco_exceptions as c_exc -from neutron.plugins.cisco.common import config from neutron.plugins.cisco.db import network_models_v2 from neutron.plugins.openvswitch import ovs_models_v2 @@ -29,25 +28,6 @@ from neutron.plugins.openvswitch import ovs_models_v2 LOG = logging.getLogger(__name__) -def create_vlanids(): - """Prepopulates the vlan_bindings table.""" - LOG.debug(_("create_vlanids() called")) - session = db.get_session() - try: - vlanid = session.query(network_models_v2.VlanID).one() - except exc.MultipleResultsFound: - pass - except exc.NoResultFound: - start = int(config.CISCO.vlan_start) - end = int(config.CISCO.vlan_end) - while start <= end: - vlanid = network_models_v2.VlanID(start) - session.add(vlanid) - start += 1 - session.flush() - return - - def get_all_vlanids(): """Gets all the vlanids.""" LOG.debug(_("get_all_vlanids() called"))