2.58. test_mpls module

class test_mpls.TestMPLS(methodName='runTest')

Bases: framework.VppTestCase

MPLS Test Case

create_stream_ip4(src_if, dst_ip, ip_ttl=64, ip_dscp=0)
create_stream_ip6(src_if, dst_ip, ip_ttl=64, ip_dscp=0)
create_stream_labelled_ip4(src_if, mpls_labels, ping=0, ip_itf=None, dst_ip=None, chksum=None, ip_ttl=64, n=257)
create_stream_labelled_ip6(src_if, mpls_labels, hlim=64, dst_ip=None)
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

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

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

test_6pe()

MPLS 6PE

test_bind()

MPLS Local Label Binding test

test_deag()

MPLS Deagg

test_imposition()

MPLS label imposition test

test_interface_rx()

MPLS Interface Receive

test_mcast_head()

MPLS Multicast Head-end

test_mcast_ip4_tail()

MPLS IPv4 Multicast Tail

test_mcast_ip6_tail()

MPLS IPv6 Multicast Tail

test_mcast_mid_point()

MPLS Multicast Mid Point

test_mpls_tunnel_many()

MPLS Multiple Tunnels

test_swap()

MPLS label swap tests

test_tunnel_pipe()

MPLS Tunnel Tests - Pipe

test_tunnel_uniform()

MPLS Tunnel Tests - Uniform

test_v4_exp_null()

MPLS V4 Explicit NULL test

test_v6_exp_null()

MPLS V6 Explicit NULL test

verify_capture_ip4(src_if, capture, sent, ping_resp=0, ip_ttl=None, ip_dscp=0)
verify_capture_ip6(src_if, capture, sent, ip_hlim=None, ip_dscp=0)
verify_capture_ip6_icmp(src_if, capture, sent)
verify_capture_labelled(src_if, capture, sent, mpls_labels)
verify_capture_labelled_ip4(src_if, capture, sent, mpls_labels, ip_ttl=None)
verify_capture_labelled_ip6(src_if, capture, sent, mpls_labels, ip_ttl=None)
verify_capture_tunneled_ip4(src_if, capture, sent, mpls_labels)
class test_mpls.TestMPLSDisabled(methodName='runTest')

Bases: framework.VppTestCase

MPLS disabled

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

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

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

test_mpls_disabled()

MPLS Disabled

class test_mpls.TestMPLSL2(methodName='runTest')

Bases: framework.VppTestCase

MPLS-L2

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

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

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

test_vpls()

Virtual Private LAN Service

test_vpws()

Virtual Private Wire Service

verify_capture_tunneled_ethernet(capture, sent, mpls_labels)
class test_mpls.TestMPLSPIC(methodName='runTest')

Bases: framework.VppTestCase

MPLS Prefix-Independent Convergence (PIC) edge convergence

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

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

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

test_mpls_ebgp_pic()

MPLS eBGP Prefix-Independent Convergence (PIC) edge convergence

  1. setup many eBGP VPN routes via a pair of eBGP peers.

  2. Check EMCP forwarding to these peers

  3. withdraw one eBGP path - expect LB across remaining eBGP

test_mpls_ibgp_pic()

MPLS iBGP Prefix-Independent Convergence (PIC) edge convergence

  1. setup many iBGP VPN routes via a pair of iBGP peers.

  2. Check EMCP forwarding to these peers

  3. withdraw the IGP route to one of these peers.

  4. check forwarding continues to the remaining peer

test_mpls_v6_ebgp_pic()

MPLSv6 eBGP Prefix-Independent Convergence (PIC) edge convergence

  1. setup many eBGP VPNv6 routes via a pair of eBGP peers

  2. Check EMCP forwarding to these peers

  3. withdraw one eBGP path - expect LB across remaining eBGP

test_mpls.verify_filter(capture, sent)
test_mpls.verify_mpls_stack(tst, rx, mpls_labels)