X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=dd4774dc72ba82f33e8be2f87780fad29bc9d2ec;hb=d5c60b96a3fd93916fc4af5c8d6d25625c28242e;hp=be8c209f4ea277c2b972f668d87463d8a2f37df6;hpb=3e2d57d8773e1d03577048f497dc7ed567fd9344;p=vpp.git diff --git a/test/framework.py b/test/framework.py index be8c209f4ea..dd4774dc72b 100644 --- a/test/framework.py +++ b/test/framework.py @@ -558,18 +558,16 @@ class VppTestCase(unittest.TestCase): return result @classmethod - def create_loopback_interfaces(cls, interfaces): + def create_loopback_interfaces(cls, count): """ Create loopback interfaces. - :param interfaces: iterable indexes of the interfaces. + :param count: number of interfaces created. :returns: List of created interfaces. """ - result = [] - for i in interfaces: - intf = VppLoInterface(cls, i) + result = [VppLoInterface(cls) for i in range(count)] + for intf in result: setattr(cls, intf.name, intf) - result.append(intf) cls.lo_interfaces = result return result