diff options
author | Matej Klotton <mklotton@cisco.com> | 2016-11-04 11:11:44 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-11-11 10:29:04 +0000 |
commit | 0178d52384e0428368f1acf3163e664ecda7b64c (patch) | |
tree | 8f6e09a23ca9b332df92f0ac16cc7d2526d7e4b6 /test/framework.py | |
parent | 9db551cf50da13bf82d3a735ea6b56912a97d5c6 (diff) |
Add IRB test
- JIRA: CSIT-255
- create loopback interfaces
- move pg-interface specific arp and neighbor discovery from vpp_interface to vpp_pg_interface
- base configuration of IRB tests
- IP test scenario
Change-Id: I9945a188163652a4e22325877aef008c4d029557
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test/framework.py b/test/framework.py index b10592cf1e7..8dbc18fda4f 100644 --- a/test/framework.py +++ b/test/framework.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from abc import * -import os import subprocess import unittest import tempfile @@ -13,6 +11,7 @@ from threading import Thread from inspect import getdoc from hook import StepHook, PollHook from vpp_pg_interface import VppPGInterface +from vpp_lo_interface import VppLoInterface from vpp_papi_provider import VppPapiProvider from scapy.packet import Raw from log import * @@ -330,6 +329,22 @@ class VppTestCase(unittest.TestCase): cls.pg_interfaces = result return result + @classmethod + def create_loopback_interfaces(cls, interfaces): + """ + Create loopback interfaces + + :param interfaces: iterable indexes of the interfaces + + """ + result = [] + for i in interfaces: + intf = VppLoInterface(cls, i) + setattr(cls, intf.name, intf) + result.append(intf) + cls.lo_interfaces = result + return result + @staticmethod def extend_packet(packet, size): """ |