]>
git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_mpls.py
1 from lib
.lutil
import luCommand
, luLast
2 from lib
import topotest
7 "\d*(?= via inet 10.0.2.4 dev r2-eth1)",
9 "See mpls route to r4",
13 if ret
!= False and found
!= None:
14 label4r4
= found
.group(0)
15 luCommand("r2", "ip -M route show", ".", "pass", "See %s as label to r4" % label4r4
)
19 "\d*(?= via inet 10.0.1.1 dev r2-eth0)",
21 "See mpls route to r1",
25 if ret
!= False and found
!= None:
26 label4r1
= found
.group(0)
27 luCommand("r2", "ip -M route show", ".", "pass", "See %s as label to r1" % label4r1
)
31 "ip route show vrf r1-cust1",
34 "VRF->MPLS PHP route installed",
38 "ip route show vrf r4-cust2",
41 "VRF->MPLS PHP route installed",
44 luCommand("r1", "ip -M route show", "101", "pass", "MPLS->VRF route installed")
45 luCommand("r4", "ip -M route show", "1041", "pass", "MPLS->VRF1 route installed")
46 luCommand("r4", "ip -M route show", "1042", "pass", "MPLS->VRF2 route installed")
50 "ping 99.0.0.4 -I 99.0.0.1 -c 1",
53 "CE->CE (loopback) ping - l3vpn+zebra case",
55 # skip due to VRF weirdness
56 # luCommand('ce4', 'ping 99.0.0.1 -I 99.0.0.4 -c 1',
57 # ' 0. packet loss','wait','CE->CE (loopback) ping - l3vpn+zebra case')
61 "ping 99.0.0.4 -I 99.0.0.1 -c 1",
64 "CE->CE (loopback) ping",
66 # luCommand('ce4', 'ping 99.0.0.1 -I 99.0.0.4 -c 1',
67 # ' 0. packet loss','wait','CE->CE (loopback) ping')
69 luCommand("r3", "ip -M route show", "103", "pass", "MPLS->VRF route installed")
72 "ping 99.0.0.3 -I 99.0.0.2 -c 1",
75 "CE2->CE3 (loopback) ping",
79 "ping 99.0.0.4 -I 99.0.0.3 -c 1",
82 "CE3->CE4 (loopback) ping",