From: YAMAMOTO Takashi Date: Fri, 24 Oct 2014 07:25:38 +0000 (+0900) Subject: openvswitch/ofagent: Remove OVS.enable_tunneling option X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=77860af4831ed34b3b1b2299cf11041aa5573558;p=openstack-build%2Fneutron-build.git openvswitch/ofagent: Remove OVS.enable_tunneling option The option has been marked deprecated in IceHouse. Please use AGENT.tunnel_types=gre instead. DocImpact Related-Bug: #1195374 Change-Id: Iea6159c5949a63a0b680818a3fd0928d470115bd --- diff --git a/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini b/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini index 232ca71d3..515fc1fce 100644 --- a/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini +++ b/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini @@ -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 diff --git a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py index 63ccc27de..3427d30c2 100644 --- a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py +++ b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py @@ -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: diff --git a/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py index 66227bd96..c743e1b65 100644 --- a/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py @@ -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: diff --git a/neutron/plugins/openvswitch/common/config.py b/neutron/plugins/openvswitch/common/config.py index 227962160..a5d1e92cf 100644 --- a/neutron/plugins/openvswitch/common/config.py +++ b/neutron/plugins/openvswitch/common/config.py @@ -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', diff --git a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py index f3f431bce..b13196510 100644 --- a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py +++ b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py @@ -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) diff --git a/neutron/tests/unit/openvswitch/test_ovs_defaults.py b/neutron/tests/unit/openvswitch/test_ovs_defaults.py index e52b4530e..7436cc761 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_defaults.py +++ b/neutron/tests/unit/openvswitch/test_ovs_defaults.py @@ -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) diff --git a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py index 3874a3c43..856854b7d 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py +++ b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py @@ -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)