From 192b13f96d6b4d1b4cbbb64a3d447329bf2ba900 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 15 Mar 2019 02:16:20 -0700 Subject: 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 --- test/framework.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/framework.py') 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=' '): """ -- cgit 1.2.3-korg