test framework: vpp_papi_provider.py - further cleanup
[vpp.git] / test / test_gre.py
index dd7b8bc..ccd66c4 100644 (file)
@@ -1,14 +1,6 @@
 #!/usr/bin/env python
 
 import unittest
-from logging import *
-
-from framework import VppTestCase, VppTestRunner
-from vpp_sub_interface import VppDot1QSubint
-from vpp_gre_interface import VppGreInterface, VppGre6Interface
-from vpp_ip import DpoProto
-from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable
-from vpp_papi_provider import L2_VTR_OP
 
 from scapy.packet import Raw
 from scapy.layers.l2 import Ether, Dot1Q, GRE
@@ -16,6 +8,12 @@ from scapy.layers.inet import IP, UDP
 from scapy.layers.inet6 import IPv6
 from scapy.volatile import RandMAC, RandIP
 
+from framework import VppTestCase, VppTestRunner
+from vpp_sub_interface import VppDot1QSubint
+from vpp_gre_interface import VppGreInterface, VppGre6Interface
+from vpp_ip import DpoProto
+from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable
+from vpp_papi_provider import L2_VTR_OP
 from util import ppp, ppc
 
 
@@ -826,12 +824,12 @@ class TestGRE(VppTestCase):
         # Configure both to pop thier respective VLAN tags,
         # so that during the x-coonect they will subsequently push
         #
-        self.vapi.sw_interface_set_l2_tag_rewrite(gre_if_12.sw_if_index,
-                                                  L2_VTR_OP.L2_POP_1,
-                                                  12)
-        self.vapi.sw_interface_set_l2_tag_rewrite(gre_if_11.sw_if_index,
-                                                  L2_VTR_OP.L2_POP_1,
-                                                  11)
+        self.vapi.l2_interface_vlan_tag_rewrite(gre_if_12.sw_if_index,
+                                                L2_VTR_OP.L2_POP_1,
+                                                12)
+        self.vapi.l2_interface_vlan_tag_rewrite(gre_if_11.sw_if_index,
+                                                L2_VTR_OP.L2_POP_1,
+                                                11)
 
         #
         # Send traffic in both directiond - expect the VLAN tags to