]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Clean up Cisco plugin config parameters
authorHenryGessau <gessau@cisco.com>
Wed, 17 Jul 2013 21:23:06 +0000 (17:23 -0400)
committerHenryGessau <gessau@cisco.com>
Thu, 18 Jul 2013 14:23:54 +0000 (10:23 -0400)
Fixes: bug 1201537
Change-Id: Ibb5a9a12ee451c317ae747924b336ffa044a20b1

etc/neutron/plugins/cisco/cisco_plugins.ini
neutron/plugins/cisco/common/config.py
neutron/plugins/cisco/db/network_db_v2.py

index 44b0131ca1088742dc9f3bd0451055a2282490f1..a5e6e2d9b21d9312838adeeb4e84fa6e734efe09 100644 (file)
@@ -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
-
-#
-# Nexus Switch Format.
+
+# (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.
+#
+# 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:<IP address of switch>]
-# <hostname>=<port>
-# ssh_port=<ssh port>
-# username=<credential username>
-# password=<credential password>
+# <hostname>=<port>                 (1)
+# ssh_port=<ssh port>               (2)
+# username=<credential username>    (3)
+# password=<credential 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]
index 30e755164bed93b9b124d7a31db5c682024bb854..e085ae61a099350032298a1e8cecaaab6e45145c 100644 (file)
@@ -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',
index b045be0944f7ef1c15546a51c41e8bc014b2de8d..48186848176c581ef6df55da00acaed5de3228c2 100644 (file)
@@ -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"))