Merge "openvswitch/ofagent: Remove OVS.enable_tunneling option"
This commit is contained in:
commit
c57b7411ed
@ -1,13 +1,4 @@
|
|||||||
[ovs]
|
[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.
|
# 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.
|
# 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
|
# The integration bridge acts as a virtual "patch bay". All VM VIFs are
|
||||||
|
@ -929,10 +929,6 @@ def create_agent_config_map(config):
|
|||||||
tunnel_types=config.AGENT.tunnel_types,
|
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
|
# Verify the tunnel_types specified are valid
|
||||||
for tun in kwargs['tunnel_types']:
|
for tun in kwargs['tunnel_types']:
|
||||||
if tun not in constants.TUNNEL_NETWORK_TYPES:
|
if tun not in constants.TUNNEL_NETWORK_TYPES:
|
||||||
|
@ -1543,10 +1543,6 @@ def create_agent_config_map(config):
|
|||||||
use_veth_interconnection=config.OVS.use_veth_interconnection,
|
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
|
# Verify the tunnel_types specified are valid
|
||||||
for tun in kwargs['tunnel_types']:
|
for tun in kwargs['tunnel_types']:
|
||||||
if tun not in constants.TUNNEL_NETWORK_TYPES:
|
if tun not in constants.TUNNEL_NETWORK_TYPES:
|
||||||
|
@ -27,8 +27,6 @@ DEFAULT_TUNNEL_TYPES = []
|
|||||||
ovs_opts = [
|
ovs_opts = [
|
||||||
cfg.StrOpt('integration_bridge', default='br-int',
|
cfg.StrOpt('integration_bridge', default='br-int',
|
||||||
help=_("Integration bridge to use.")),
|
help=_("Integration bridge to use.")),
|
||||||
cfg.BoolOpt('enable_tunneling', default=False,
|
|
||||||
help=_("Enable tunneling support.")),
|
|
||||||
cfg.StrOpt('tunnel_bridge', default='br-tun',
|
cfg.StrOpt('tunnel_bridge', default='br-tun',
|
||||||
help=_("Tunnel bridge to use.")),
|
help=_("Tunnel bridge to use.")),
|
||||||
cfg.StrOpt('int_peer_patch_port', default='patch-tun',
|
cfg.StrOpt('int_peer_patch_port', default='patch-tun',
|
||||||
|
@ -64,17 +64,10 @@ class CreateAgentConfigMap(ofa_test_base.OFAAgentTestBase):
|
|||||||
with testtools.ExpectedException(ValueError):
|
with testtools.ExpectedException(ValueError):
|
||||||
self.mod_agent.create_agent_config_map(cfg.CONF)
|
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):
|
def test_create_agent_config_map_fails_no_local_ip(self):
|
||||||
# An ip address is required for tunneling but there is no default
|
# 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):
|
with testtools.ExpectedException(ValueError):
|
||||||
self.mod_agent.create_agent_config_map(cfg.CONF)
|
self.mod_agent.create_agent_config_map(cfg.CONF)
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ class ConfigurationTest(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_defaults(self):
|
def test_defaults(self):
|
||||||
self.assertEqual('br-int', cfg.CONF.OVS.integration_bridge)
|
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('br-tun', cfg.CONF.OVS.tunnel_bridge)
|
||||||
self.assertEqual(2, cfg.CONF.AGENT.polling_interval)
|
self.assertEqual(2, cfg.CONF.AGENT.polling_interval)
|
||||||
self.assertEqual('sudo', cfg.CONF.AGENT.root_helper)
|
self.assertEqual('sudo', cfg.CONF.AGENT.root_helper)
|
||||||
|
@ -60,17 +60,10 @@ class CreateAgentConfigMap(base.BaseTestCase):
|
|||||||
with testtools.ExpectedException(ValueError):
|
with testtools.ExpectedException(ValueError):
|
||||||
ovs_neutron_agent.create_agent_config_map(cfg.CONF)
|
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):
|
def test_create_agent_config_map_fails_no_local_ip(self):
|
||||||
# An ip address is required for tunneling but there is no default
|
# 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):
|
with testtools.ExpectedException(ValueError):
|
||||||
ovs_neutron_agent.create_agent_config_map(cfg.CONF)
|
ovs_neutron_agent.create_agent_config_map(cfg.CONF)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user