PAPI: Add MACAddress object wrapper for vl_api_mac_address_t
[vpp.git] / test / test_ip4_irb.py
index 6aad60a..8c3830c 100644 (file)
@@ -31,7 +31,8 @@ from scapy.layers.l2 import Ether
 from scapy.layers.inet import IP, UDP
 
 from framework import VppTestCase, VppTestRunner
-from util import mactobinary
+from vpp_papi import MACAddress
+from vpp_papi_provider import L2_PORT_TYPE
 
 
 class TestIpIrb(VppTestCase):
@@ -65,7 +66,8 @@ class TestIpIrb(VppTestCase):
 
         # Create BD with MAC learning enabled and put interfaces to this BD
         cls.vapi.sw_interface_set_l2_bridge(
-            cls.loop0.sw_if_index, bd_id=cls.bd_id, bvi=1)
+            cls.loop0.sw_if_index, bd_id=cls.bd_id,
+            port_type=L2_PORT_TYPE.BVI)
         cls.vapi.sw_interface_set_l2_bridge(
             cls.pg0.sw_if_index, bd_id=cls.bd_id)
         cls.vapi.sw_interface_set_l2_bridge(
@@ -263,7 +265,7 @@ class TestIpIrb(VppTestCase):
         self.send_and_verify_l2_to_ip()
 
         # change the BVI's mac and resed traffic
-        self.loop0.set_mac("00:00:00:11:11:33")
+        self.loop0.set_mac(MACAddress("00:00:00:11:11:33"))
 
         self.send_and_verify_l2_to_ip()
         # check it wasn't flooded