# outbound
self.tun_br.add_flow(priority=4, in_port=self.patch_int_ofport,
dl_vlan=lvid,
- actions="strip_vlan,set_tunnel:%s,normal" %
- (lsw_id))
- # inbound
+ actions="set_tunnel:%s,normal" % lsw_id)
+ # inbound bcast/mcast
self.tun_br.add_flow(priority=3, tun_id=lsw_id,
+ dl_dst="01:00:00:00:00:00/01:00:00:00:00:00",
actions="mod_vlan_vid:%s,output:%s" %
(lvid, self.patch_int_ofport))
lvm = self.local_vlan_map[net_uuid]
lvm.vif_ids.append(port.vif_id)
+ # inbound unicast
+ self.tun_br.add_flow(priority=3, tun_id=lsw_id, dl_dst=port.vif_mac,
+ actions="mod_vlan_vid:%s,normal" % lvm.vlan)
+
self.int_br.set_db_attribute("Port", port.port_name, "tag",
str(lvm.vlan))
if int(port.ofport) != -1:
OFPORT_NUM = 1
VIF_PORT = ovs_lib.VifPort('port', OFPORT_NUM,
VIF_ID, VIF_MAC, 'switch')
+BCAST_MAC = "01:00:00:00:00:00/01:00:00:00:00:00"
class DummyPort:
self.mox.VerifyAll()
def testProvisionLocalVlan(self):
- action_string = 'strip_vlan,set_tunnel:%s,normal' % LS_ID
+ action_string = 'set_tunnel:%s,normal' % LS_ID
self.mock_tun_bridge.add_flow(priority=4, in_port=self.INT_OFPORT,
dl_vlan=LV_ID, actions=action_string)
action_string = 'mod_vlan_vid:%s,output:%s' % (LV_ID, self.INT_OFPORT)
self.mock_tun_bridge.add_flow(priority=3, tun_id=LS_ID,
- actions=action_string)
+ dl_dst=BCAST_MAC, actions=action_string)
self.mox.ReplayAll()
'tag', str(LVM.vlan))
self.mock_int_bridge.delete_flows(in_port=VIF_PORT.ofport)
+ action_string = 'mod_vlan_vid:%s,normal' % LV_ID
+ self.mock_tun_bridge.add_flow(priority=3, tun_id=LS_ID,
+ dl_dst=VIF_PORT.vif_mac,
+ actions=action_string)
+
self.mox.ReplayAll()
a = ovs_quantum_agent.OVSQuantumTunnelAgent(self.INT_BRIDGE,
self.TUN_BRIDGE,