[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
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:
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:
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',
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)
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)
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)