summaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-15 02:16:20 -0700
committerJohn Lo <loj@cisco.com>2019-03-21 20:33:30 +0000
commit192b13f96d6b4d1b4cbbb64a3d447329bf2ba900 (patch)
tree44681e508ad2dc06af4518e6f4d0ead6ff35ab77 /test/framework.py
parent1ea74b5df5acfc827ee53fd5cb6bdb40140da0f0 (diff)
BVI Interface
a new dedicated BVI interface as opposed to [re]using a loopback. benefits: - removes ambiguity over the purpose of a loopback interface - TX node dedicated to BVI only functions. Change-Id: I749d6b38440d450ac5b909a28053c75ec9df946a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/framework.py b/test/framework.py
index ea989eb242d..dce477d16d2 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -25,6 +25,7 @@ from hook import StepHook, PollHook, VppDiedError
from vpp_pg_interface import VppPGInterface
from vpp_sub_interface import VppSubInterface
from vpp_lo_interface import VppLoInterface
+from vpp_bvi_interface import VppBviInterface
from vpp_papi_provider import VppPapiProvider
from vpp_papi.vpp_stats import VPPStats
from log import RED, GREEN, YELLOW, double_line_delim, single_line_delim, \
@@ -690,6 +691,20 @@ class VppTestCase(unittest.TestCase):
cls.lo_interfaces = result
return result
+ @classmethod
+ def create_bvi_interfaces(cls, count):
+ """
+ Create BVI interfaces.
+
+ :param count: number of interfaces created.
+ :returns: List of created interfaces.
+ """
+ result = [VppBviInterface(cls) for i in range(count)]
+ for intf in result:
+ setattr(cls, intf.name, intf)
+ cls.bvi_interfaces = result
+ return result
+
@staticmethod
def extend_packet(packet, size, padding=' '):
"""