GBP: contracts API fixed length of allowed ethertypes
[vpp.git] / test / test_gbp.py
index 09d218d..cf9ad25 100644 (file)
@@ -461,6 +461,8 @@ class VppGbpContract(VppObject):
         self.dst_epg = dst_epg
         self.rules = rules
         self.allowed_ethertypes = allowed_ethertypes
+        while (len(self.allowed_ethertypes) < 16):
+            self.allowed_ethertypes.append(0)
 
     def add_vpp_config(self):
         rules = []
@@ -481,7 +483,8 @@ class VppGbpContract(VppObject):
             self.src_epg.sclass,
             self.dst_epg.sclass,
             self.acl_index,
-            [], [])
+            [],
+            self.allowed_ethertypes)
 
     def __str__(self):
         return self.object_id()
@@ -1977,9 +1980,9 @@ class TestGBP(VppTestCase):
         #
         vlan_11 = VppDot1QSubint(self, self.pg0, 11)
         vlan_11.admin_up()
-        self.vapi.l2_interface_vlan_tag_rewrite(vlan_11.sw_if_index,
-                                                L2_VTR_OP.L2_POP_1,
-                                                11)
+        self.vapi.l2_interface_vlan_tag_rewrite(
+            sw_if_index=vlan_11.sw_if_index, vtr_op=L2_VTR_OP.L2_POP_1,
+            push_dot1q=11)
 
         bd_uu_fwd = VppVxlanGbpTunnel(self, self.pg3.local_ip4,
                                       self.pg3.remote_ip4, 116)