aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/framework.py b/test/framework.py
index dd4774dc72b..be8c209f4ea 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -558,16 +558,18 @@ class VppTestCase(unittest.TestCase):
return result
@classmethod
- def create_loopback_interfaces(cls, count):
+ def create_loopback_interfaces(cls, interfaces):
"""
Create loopback interfaces.
- :param count: number of interfaces created.
+ :param interfaces: iterable indexes of the interfaces.
:returns: List of created interfaces.
"""
- result = [VppLoInterface(cls) for i in range(count)]
- for intf in result:
+ result = []
+ for i in interfaces:
+ intf = VppLoInterface(cls, i)
setattr(cls, intf.name, intf)
+ result.append(intf)
cls.lo_interfaces = result
return result