

def test_install_unicast_to_tun(self):
    vlan = 3333
    port = 55
    mac = '08:60:6e:7f:74:e7'
    tun_id = 2222
    self.br.install_unicast_to_tun(vlan=vlan, tun_id=tun_id, port=port, mac=mac)
    (dp, ofp, ofpp) = self._get_dp()
    expected = [call._send_msg(ofpp.OFPFlowMod(dp, cookie=self.stamp, instructions=[ofpp.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, [ofpp.OFPActionPopVlan(), ofpp.OFPActionSetField(tunnel_id=tun_id), ofpp.OFPActionOutput(port, 0)])], match=ofpp.OFPMatch(eth_dst=mac, vlan_vid=(vlan | ofp.OFPVID_PRESENT)), priority=2, table_id=20))]
    self.assertEqual(expected, self.mock.mock_calls)

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_br_tun.py OVSTunnelBridgeTest.test_install_unicast_to_tun/original