2.24. test_ip6_vrf_multi_instance module¶
IP6 VRF Multi-instance Test Case HLD:
- NOTES:
- higher number of pg-ip6 interfaces causes problems => only 15 pg-ip6 interfaces in 5 VRFs are tested
- jumbo packets in configuration with 15 pg-ip6 interfaces leads to problems too
- config 1
- add 15 pg-ip6 interfaces
- configure 5 hosts per pg-ip6 interface
- configure 4 VRFs
- add 3 pg-ip6 interfaces per VRF
- test 1
- send IP6 packets between all pg-ip6 interfaces in all VRF groups
- verify 1
- check VRF data by parsing output of ip6_fib_dump API command
- all packets received correctly in case of pg-ip6 interfaces in VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- config 2
- reset 2 VRFs
- test 2
- send IP6 packets between all pg-ip6 interfaces in all VRF groups
- verify 2
- check VRF data by parsing output of ip6_fib_dump API command
- all packets received correctly in case of pg-ip6 interfaces in VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- config 3
- add 1 of reset VRFs and 1 new VRF
- test 3
- send IP6 packets between all pg-ip6 interfaces in all VRF groups
- verify 3
- check VRF data by parsing output of ip6_fib_dump API command
- all packets received correctly in case of pg-ip6 interfaces in VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- config 4
- reset all VRFs (i.e. no VRF except VRF=0 created)
- test 4
- send IP6 packets between all pg-ip6 interfaces in all VRF groups
- verify 4
- check VRF data by parsing output of ip6_fib_dump API command
- all packets received correctly in case of pg-ip6 interfaces in VRF
- no packet received in case of pg-ip6 interfaces not in VRF
-
class
test_ip6_vrf_multi_instance.
TestIP6VrfMultiInst
(methodName='runTest')¶ Bases:
framework.VppTestCase
IP6 VRF Multi-instance Test Case
-
create_stream
(src_if, packet_sizes)¶ Create input packet stream for defined interface using hosts list.
Parameters: - src_if (object) – Interface to create packet stream for.
- packet_sizes (list) – List of required packet sizes.
Returns: Stream of packets.
-
create_vrf_and_assign_interfaces
(count, start=1)¶ Create required number of FIB tables / VRFs, put 3 l2-pg interfaces to every FIB table / VRF.
Parameters: - count (int) – Number of FIB tables / VRFs to be created.
- start (int) – Starting number of the FIB table / VRF ID. (Default value = 1)
-
reset_vrf
(vrf_id)¶ Reset required FIB table / VRF.
Parameters: vrf_id (int) – The FIB table / VRF ID to be reset.
-
run_verify_test
()¶ - Create packet streams for all configured l2-pg interfaces, send all prepared packet streams and verify that:
- all packets received correctly on all pg-l2 interfaces assigned to bridge domains
- no packet received on all pg-l2 interfaces not assigned to bridge domains
Raises: RuntimeError – If no packet captured on l2-pg interface assigned to the bridge domain or if any packet is captured on l2-pg interface not assigned to the bridge domain.
-
setUp
()¶ Clear trace and packet infos before running each test.
-
classmethod
setUpClass
()¶ Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.
-
tearDown
()¶ Show various debug prints after each test.
-
test_ip6_vrf_01
()¶ IP6 VRF Multi-instance test 1 - create 4 VRFs
-
test_ip6_vrf_02
()¶ IP6 VRF Multi-instance test 2 - reset 2 VRFs
-
test_ip6_vrf_03
()¶ IP6 VRF Multi-instance 3 - add 2 VRFs
-
test_ip6_vrf_04
()¶ IP6 VRF Multi-instance test 4 - reset 4 VRFs
-
verify_capture
(pg_if, capture)¶ Verify captured input packet stream for defined interface.
Parameters: - pg_if (object) – Interface to verify captured packet stream for.
- capture (list) – Captured packet stream.
-
verify_vrf
(vrf_id)¶ Check if the FIB table / VRF ID is configured.
Parameters: vrf_id (int) – The FIB table / VRF ID to be verified. Returns: 1 if the FIB table / VRF ID is configured, otherwise return 0.
-
-
test_ip6_vrf_multi_instance.
is_ipv6_misc_ext
(p)¶ Is packet one of uninteresting IPv6 broadcasts (extended to filter out ICMPv6 Neighbor Discovery - Neighbor Advertisement packets too)?