blob: 6a336eb72d9ab9a8c59ebe506e9b826b9258560d (
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
|
import abc
from vpp_pg_interface import is_ipv6_misc
from vpp_interface import VppInterface
class VppTunnelInterface(VppInterface, metaclass=abc.ABCMeta):
""" 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)
|