2.88. test_lisp module

class test_lisp.Driver(test, test_cases)

Bases: object

config_order = ['locator-sets', 'locators', 'local-mappings', 'remote-mappings', 'adjacencies']

Basic class for data driven testing

create_packet(src_if, dst_if, deid, payload='')

Create IPv4 packet

param: src_if param: dst_if

abstract run()

testing procedure

property test
property test_cases
class test_lisp.ForeignAddressFactory

Bases: object

count = 0
get_ip4()
net = '10.10.10.0/24'
net_template = '10.10.10.{}'
prefix_len = 24
class test_lisp.LISP_GPE_Header(*args, **kargs)

Bases: scapy.packet.None

aliastypes = [<class 'test_lisp.LISP_GPE_Header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LISP_GPE_Header).gpe_flags>, <Field (LISP_GPE_Header).reserved>, <Field (LISP_GPE_Header).next_proto>, <Field (LISP_GPE_Header).iid>]
payload_guess = [({'next_proto': 1}, <class 'scapy.layers.inet.IP'>), ({'next_proto': 2}, <class 'scapy.layers.inet6.IPv6'>), ({'next_proto': 3}, <class 'scapy.layers.l2.Ether'>)]
class test_lisp.SimpleDriver(test, test_cases)

Bases: test_lisp.Driver

Implements simple test procedure

configure_tc(tc)
run(dest)

Send traffic for each test case and verify that it is encapsulated

verify_capture(src_loc, dst_loc, capture)

Verify captured packet

Parameters
  • src_loc – source locator address

  • dst_loc – destination locator address

  • capture – list of captured packets

class test_lisp.TestLisp(methodName='runTest')

Bases: framework.VppTestCase

Basic LISP test

setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_lisp_basic_encap()

Test case for basic encapsulation

class test_lisp.TestLispUT(methodName='runTest')

Bases: framework.VppTestCase

Lisp UT

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_fib()

LISP Unit Tests