tests: replace pycodestyle with black
[vpp.git] / test / vpp_tunnel_interface.py
1 import abc
2 from vpp_pg_interface import is_ipv6_misc
3 from vpp_interface import VppInterface
4
5
6 class VppTunnelInterface(VppInterface, metaclass=abc.ABCMeta):
7     """VPP tunnel interface abstraction"""
8
9     def __init__(self, test, parent_if):
10         super(VppTunnelInterface, self).__init__(test)
11         self.parent_if = parent_if
12
13     @property
14     def local_mac(self):
15         return self.parent_if.local_mac
16
17     @property
18     def remote_mac(self):
19         return self.parent_if.remote_mac
20
21     def enable_capture(self):
22         return self.parent_if.enable_capture()
23
24     def add_stream(self, pkts):
25         return self.parent_if.add_stream(pkts)
26
27     def get_capture(
28         self, expected_count=None, remark=None, timeout=1, filter_out_fn=is_ipv6_misc
29     ):
30         return self.parent_if.get_capture(
31             expected_count, remark, timeout, filter_out_fn
32         )