Revert "API: Cleanup APIs interface.api"
[vpp.git] / test / vpp_sub_interface.py
index 63a0f54..15cd6ed 100644 (file)
@@ -119,8 +119,8 @@ class VppSubInterface(VppPGInterface):
             self._tag2 = inner
             self._push1q = push1q
 
-        self.test.vapi.sw_interface_set_l2_tag_rewrite(
-            self.sw_if_index, vtr, push=self._push1q,
+        self.test.vapi.l2_interface_vlan_tag_rewrite(
+            sw_if_index=self.sw_if_index, vtr_op=vtr, push_dot1q=self._push1q,
             tag1=self._tag1, tag2=self._tag2)
         self._vtr = vtr
 
@@ -171,9 +171,10 @@ class VppDot1ADSubint(VppSubInterface):
 
     def __init__(self, test, parent, sub_id, outer_vlan, inner_vlan):
         super(VppDot1ADSubint, self).__init__(test, parent, sub_id)
-        r = test.vapi.create_subif(parent.sw_if_index, sub_id, outer_vlan,
-                                   inner_vlan, dot1ad=1, two_tags=1,
-                                   exact_match=1)
+        r = test.vapi.create_subif(sw_if_index=parent.sw_if_index,
+                                   sub_id=sub_id, outer_vlan_id=outer_vlan,
+                                   inner_vlan_id=inner_vlan, two_tags=1,
+                                   dot1ad=1, exact_match=1)
         self.set_sw_if_index(r.sw_if_index)
         self._outer_vlan = outer_vlan
         self._inner_vlan = inner_vlan
@@ -198,8 +199,8 @@ class VppP2PSubint(VppSubInterface):
 
     def __init__(self, test, parent, sub_id, remote_mac):
         super(VppP2PSubint, self).__init__(test, parent, sub_id)
-        r = test.vapi.create_p2pethernet_subif(parent.sw_if_index,
-                                               remote_mac, sub_id)
+        r = test.vapi.p2p_ethernet_add(parent.sw_if_index,
+                                       remote_mac, sub_id)
         self.set_sw_if_index(r.sw_if_index)
         self.parent_sw_if_index = parent.sw_if_index
         self.p2p_remote_mac = remote_mac