device.link.set_netns(self.namespace)
def add_vxlan(self, name, vni, group=None, dev=None, ttl=None, tos=None,
- local=None, port=None):
- cmd = ['add', name, 'type', 'vxlan', 'id', vni, 'proxy']
+ local=None, port=None, proxy=False):
+ cmd = ['add', name, 'type', 'vxlan', 'id', vni]
if group:
cmd.extend(['group', group])
if dev:
cmd.extend(['tos', tos])
if local:
cmd.extend(['local', local])
+ if proxy:
+ cmd.append('proxy')
# tuple: min,max
if port and len(port) == 2:
cmd.extend(['port', port[0], port[1]])
args['ttl'] = cfg.CONF.VXLAN.ttl
if cfg.CONF.VXLAN.tos:
args['tos'] = cfg.CONF.VXLAN.tos
+ if cfg.CONF.VXLAN.l2_population:
+ args['proxy'] = True
int_vxlan = self.ip.add_vxlan(interface, segmentation_id, **args)
int_vxlan.link.set_up()
LOG.debug(_("Done creating vxlan interface %s"), interface)
add_vxlan_fn.assert_called_with("vxlan-" + seg_id, seg_id,
group="224.0.0.1",
dev=self.lbm.local_int)
+ cfg.CONF.set_override('l2_population', 'True', 'VXLAN')
+ self.assertEqual(self.lbm.ensure_vxlan(seg_id),
+ "vxlan-" + seg_id)
+ add_vxlan_fn.assert_called_with("vxlan-" + seg_id, seg_id,
+ group="224.0.0.1",
+ dev=self.lbm.local_int,
+ proxy=True)
def test_update_interface_ip_details(self):
gwdict = dict(gateway='1.1.1.1',