]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
openvswitch/ofagent: Remove OVS.enable_tunneling option
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 24 Oct 2014 07:25:38 +0000 (16:25 +0900)
committerYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Mon, 15 Dec 2014 05:15:16 +0000 (05:15 +0000)
The option has been marked deprecated in IceHouse.
Please use AGENT.tunnel_types=gre instead.

DocImpact
Related-Bug: #1195374
Change-Id: Iea6159c5949a63a0b680818a3fd0928d470115bd

etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
neutron/plugins/ofagent/agent/ofa_neutron_agent.py
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/plugins/openvswitch/common/config.py
neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
neutron/tests/unit/openvswitch/test_ovs_defaults.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py

index 232ca71d368d122f475e0d183747addf0574f5d5..515fc1fce86c0d5d5da2684f82161c9fa32df3be 100644 (file)
@@ -1,13 +1,4 @@
 [ovs]
-# (BoolOpt) Set to True in the server and the agents to enable support
-# for GRE or VXLAN networks. Requires kernel support for OVS patch ports and
-# GRE or VXLAN tunneling.
-#
-# WARNING: This option will be deprecated in the Icehouse release, at which
-#          point setting tunnel_types will be required to enable tunneling.
-#
-# enable_tunneling = False
-
 # Do not change this parameter unless you have a good reason to.
 # This is the name of the OVS integration bridge. There is one per hypervisor.
 # The integration bridge acts as a virtual "patch bay". All VM VIFs are
index 63ccc27de35a265ce564c47c52036cba6b5c6d9c..3427d30c2f0030b522c0e3f31ca853e33203d611 100644 (file)
@@ -929,10 +929,6 @@ def create_agent_config_map(config):
         tunnel_types=config.AGENT.tunnel_types,
     )
 
-    # If enable_tunneling is TRUE, set tunnel_type to default to GRE
-    if config.OVS.enable_tunneling and not kwargs['tunnel_types']:
-        kwargs['tunnel_types'] = [p_const.TYPE_GRE]
-
     # Verify the tunnel_types specified are valid
     for tun in kwargs['tunnel_types']:
         if tun not in constants.TUNNEL_NETWORK_TYPES:
index 66227bd963eae9f66fb22115155cdb8d939035e9..c743e1b653ffcf84aa440e21f0e62cd575567f17 100644 (file)
@@ -1523,10 +1523,6 @@ def create_agent_config_map(config):
         use_veth_interconnection=config.OVS.use_veth_interconnection,
     )
 
-    # If enable_tunneling is TRUE, set tunnel_type to default to GRE
-    if config.OVS.enable_tunneling and not kwargs['tunnel_types']:
-        kwargs['tunnel_types'] = [p_const.TYPE_GRE]
-
     # Verify the tunnel_types specified are valid
     for tun in kwargs['tunnel_types']:
         if tun not in constants.TUNNEL_NETWORK_TYPES:
index 227962160a87a56e79e5c70ee6acbbf9bae3ac72..a5d1e92cfc143a0b2093b8c9ea44a9918b0b50a8 100644 (file)
@@ -27,8 +27,6 @@ DEFAULT_TUNNEL_TYPES = []
 ovs_opts = [
     cfg.StrOpt('integration_bridge', default='br-int',
                help=_("Integration bridge to use.")),
-    cfg.BoolOpt('enable_tunneling', default=False,
-                help=_("Enable tunneling support.")),
     cfg.StrOpt('tunnel_bridge', default='br-tun',
                help=_("Tunnel bridge to use.")),
     cfg.StrOpt('int_peer_patch_port', default='patch-tun',
index f3f431bcebe5efc20faa1da1400f9b320aa1f644..b13196510999fff6e8a27c2d1ed438bc84f30ffd 100644 (file)
@@ -64,17 +64,10 @@ class CreateAgentConfigMap(ofa_test_base.OFAAgentTestBase):
         with testtools.ExpectedException(ValueError):
             self.mod_agent.create_agent_config_map(cfg.CONF)
 
-    def test_create_agent_config_map_enable_tunneling(self):
-        # Verify setting only enable_tunneling will default tunnel_type to GRE
-        cfg.CONF.set_override('tunnel_types', None, group='AGENT')
-        cfg.CONF.set_override('enable_tunneling', True, group='OVS')
-        cfg.CONF.set_override('local_ip', '10.10.10.10', group='OVS')
-        cfgmap = self.mod_agent.create_agent_config_map(cfg.CONF)
-        self.assertEqual(cfgmap['tunnel_types'], [p_const.TYPE_GRE])
-
     def test_create_agent_config_map_fails_no_local_ip(self):
         # An ip address is required for tunneling but there is no default
-        cfg.CONF.set_override('enable_tunneling', True, group='OVS')
+        cfg.CONF.set_override('tunnel_types', [p_const.TYPE_VXLAN],
+                              group='AGENT')
         with testtools.ExpectedException(ValueError):
             self.mod_agent.create_agent_config_map(cfg.CONF)
 
index e52b4530e9386c5f40889f80e8112ab978b96b24..7436cc761cfa0243361d3bae9d785bf130f66024 100644 (file)
@@ -23,7 +23,6 @@ class ConfigurationTest(base.BaseTestCase):
 
     def test_defaults(self):
         self.assertEqual('br-int', cfg.CONF.OVS.integration_bridge)
-        self.assertFalse(cfg.CONF.OVS.enable_tunneling)
         self.assertEqual('br-tun', cfg.CONF.OVS.tunnel_bridge)
         self.assertEqual(2, cfg.CONF.AGENT.polling_interval)
         self.assertEqual('sudo', cfg.CONF.AGENT.root_helper)
index 3874a3c439f5e210b085a10c470edf6053eb5ec4..856854b7d44e75bcf48faf98b8b11c3b52c4a703 100644 (file)
@@ -59,17 +59,10 @@ class CreateAgentConfigMap(base.BaseTestCase):
         with testtools.ExpectedException(ValueError):
             ovs_neutron_agent.create_agent_config_map(cfg.CONF)
 
-    def test_create_agent_config_map_enable_tunneling(self):
-        # Verify setting only enable_tunneling will default tunnel_type to GRE
-        cfg.CONF.set_override('tunnel_types', None, group='AGENT')
-        cfg.CONF.set_override('enable_tunneling', True, group='OVS')
-        cfg.CONF.set_override('local_ip', '10.10.10.10', group='OVS')
-        cfgmap = ovs_neutron_agent.create_agent_config_map(cfg.CONF)
-        self.assertEqual(cfgmap['tunnel_types'], [p_const.TYPE_GRE])
-
     def test_create_agent_config_map_fails_no_local_ip(self):
         # An ip address is required for tunneling but there is no default
-        cfg.CONF.set_override('enable_tunneling', True, group='OVS')
+        cfg.CONF.set_override('tunnel_types', [p_const.TYPE_VXLAN],
+                              group='AGENT')
         with testtools.ExpectedException(ValueError):
             ovs_neutron_agent.create_agent_config_map(cfg.CONF)