summaryrefslogtreecommitdiffstats
path: root/test/vpp_tunnel_interface.py
blob: e55486e1675984d1dad731791dd61c8705513066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import abc
import six
from vpp_pg_interface import is_ipv6_misc
from vpp_interface import VppInterface


@six.add_metaclass(abc.ABCMeta)
class VppTunnelInterface(VppInterface):
    """ VPP tunnel interface abstraction """

    def __init__(self, test, parent_if):
        super(VppTunnelInterface, self).__init__(test)
        self.parent_if = parent_if

    @property
    def local_mac(self):
        return self.parent_if.local_mac

    @property
    def remote_mac(self):
        return self.parent_if.remote_mac

    def enable_capture(self):
        return self.parent_if.enable_capture()

    def add_stream(self, pkts):
        return self.parent_if.add_stream(pkts)

    def get_capture(self, expected_count=None, remark=None, timeout=1,
                    filter_out_fn=is_ipv6_misc):
        return self.parent_if.get_capture(expected_count, remark, timeout,
                                          filter_out_fn)
ip6/ioam_cache.api udp-ping/udp_ping.api INSTALL_HEADERS lib-pot/pot_all_api_h.h lib-pot/pot_msg_enum.h lib-pot/pot_util.h lib-pot/math64.h export/ioam_export_all_api_h.h export/ioam_export_msg_enum.h lib-trace/trace_all_api_h.h lib-trace/trace_msg_enum.h lib-trace/trace_util.h encap/ip6_ioam_trace.h lib-trace/trace_config.h export-common/ioam_export.h lib-vxlan-gpe/vxlan_gpe_all_api_h.h lib-vxlan-gpe/vxlan_gpe_msg_enum.h lib-vxlan-gpe/vxlan_gpe_ioam_util.h lib-vxlan-gpe/vxlan_gpe_ioam_packet.h lib-vxlan-gpe/vxlan_gpe_ioam.h export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h encap/ip6_ioam_e2e.h encap/ip6_ioam_seqno.h lib-e2e/ioam_seqno_lib.h ip6/ioam_cache_all_api_h.h ip6/ioam_cache_msg_enum.h udp-ping/udp_ping_packet.h udp-ping/udp_ping.h udp-ping/udp_ping_util.h udp-ping/udp_ping_all_api_h.h udp-ping/udp_ping_msg_enum.h API_TEST_SOURCES ioam_test.c lib-pot/pot_test.c export/ioam_export_test.c export-vxlan-gpe/vxlan_gpe_ioam_export_test.c lib-trace/trace_test.c lib-vxlan-gpe/vxlan_gpe_test.c udp-ping/udp_ping_test.c )