X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_sub_interface.py;h=989769f09fb58541e6546692ad4db53b32c82b53;hb=6cbb111086a9fd74330d95511bc551128e1539ef;hp=4961ba5ff696dfa2210e4ae27c512038b66c3a89;hpb=95c0ca42f2d02e7562775f7c1e6535a586a26186;p=vpp.git diff --git a/test/vpp_sub_interface.py b/test/vpp_sub_interface.py index 4961ba5ff69..989769f09fb 100644 --- a/test/vpp_sub_interface.py +++ b/test/vpp_sub_interface.py @@ -1,8 +1,8 @@ from scapy.layers.l2 import Dot1Q import abc -import six from vpp_pg_interface import VppPGInterface from vpp_interface import VppInterface +from vpp_papi import VppEnum class L2_VTR_OP: @@ -17,8 +17,7 @@ class L2_VTR_OP: L2_TRANSLATE_2_2 = 8 -@six.add_metaclass(abc.ABCMeta) -class VppSubInterface(VppPGInterface): +class VppSubInterface(VppPGInterface, metaclass=abc.ABCMeta): @property def parent(self): @@ -182,10 +181,13 @@ class VppDot1ADSubint(VppSubInterface): def __init__(self, test, parent, sub_id, outer_vlan, inner_vlan): super(VppDot1ADSubint, self).__init__(test, parent, sub_id) + flags = (VppEnum.vl_api_sub_if_flags_t.SUB_IF_API_FLAG_DOT1AD | + VppEnum.vl_api_sub_if_flags_t.SUB_IF_API_FLAG_TWO_TAGS | + VppEnum.vl_api_sub_if_flags_t.SUB_IF_API_FLAG_EXACT_MATCH) 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) + inner_vlan_id=inner_vlan, + sub_if_flags=flags) self.set_sw_if_index(r.sw_if_index) self._outer_vlan = outer_vlan self._inner_vlan = inner_vlan