2.41. test_interface_crud module

CRUD tests of APIs (Create, Read, Update, Delete) HLD:

  • interface up/down/add/delete - interface type:
    • pg (TBD)

    • loopback

    • vhostuser (TBD)

    • af_packet (TBD)

    • netmap (TBD)

    • tuntap (root privileges needed)

    • vxlan (TBD)

class test_interface_crud.TestLoopbackInterfaceCRUD(methodName='runTest')

Bases: framework.VppTestCase

CRUD Loopback

static create_icmp_stream(src_if, dst_ifs)
Parameters
  • src_if (VppInterface) – Packets are send to this interface, using this interfaces remote host.

  • dst_ifs (list) – IPv4 ICMP requests are send to interfaces addresses.

Returns

List of generated packets.

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_crud()
test_down()
verify_icmp(capture, request_src_if, dst_ifs)
Parameters
  • capture – Capture to verify.

  • request_src_if (VppInterface) – Interface where was send packets.

  • dst_ifs (list) – Interfaces where was generated IPv4 ICMP requests.