2.47. test_ip_ecmp module¶
-
class
test_ip_ecmp.
TestECMP
(methodName='runTest')¶ Bases:
framework.VppTestCase
Equal-cost multi-path routing Test Case
-
create_ip_routes
(dst_ip_net, dst_prefix_len, is_ipv6=0)¶ Create IP routes for defined destination IP network.
- Parameters
dst_ip_net (str) – Destination IP network.
dst_prefix_len (int) – IP address prefix length.
is_ipv6 (int) – 0 if an ip4 route, else ip6
-
create_stream
(src_if, src_ip_start, dst_ip_start, ip_prefix_len, packet_sizes, ip_l=scapy.layers.inet.IP)¶ Create input packet stream for defined interfaces.
- Parameters
src_if (VppInterface) – Source Interface for packet stream.
src_ip_start (str) – Starting source IPv4 or IPv6 address.
dst_ip_start (str) – Starting destination IPv4 or IPv6 address.
ip_prefix_len (int) – IP address prefix length.
packet_sizes (list) – packet size to test.
ip_l (Scapy) – Required IP layer - IP or IPv6. (Default is IP.)
-
get_ip_address
(ip_addr_start, ip_prefix_len)¶ - Parameters
ip_addr_start (str) – Starting IPv4 or IPv6 address.
ip_prefix_len (int) – IP address prefix length.
- Returns
Random IPv4 or IPv6 address from required range.
-
setUp
()¶ Clear trace 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.
-
classmethod
tearDownClass
()¶ Perform final cleanup after running all tests in this test-case
-
test_ip6_ecmp
()¶ IPv6 equal-cost multi-path routing test
-
test_ip_ecmp
()¶ IP equal-cost multi-path routing test
-
verify_capture
(rx_if, capture, ip_l=scapy.layers.inet.IP)¶ Verify captured input packet stream for defined interface.
- Parameters
rx_if (VppInterface) – Interface to verify captured packet stream.
capture (list) – Captured packet stream.
ip_l (Scapy) – Required IP layer - IP or IPv6. (Default is IP.)
-