mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
LDP-Topo1: Update test to accept new format of LDP output
* Added test to check for version * Adopted all tests to verify against the correct version of output Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
parent
1c909f4248
commit
3eaafbd95d
5
tests/topotests/ldp-topo1/r1/ip_mpls_route.ref-1
Normal file
5
tests/topotests/ldp-topo1/r1/ip_mpls_route.ref-1
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
xx as to xx via inet 10.0.1.2 dev r1-eth0 proto zebra
|
||||||
|
xx as to xx via inet 10.0.1.2 dev r1-eth0 proto zebra
|
||||||
|
xx via inet 10.0.1.2 dev r1-eth0 proto zebra
|
||||||
|
xx via inet 10.0.1.2 dev r1-eth0 proto zebra
|
||||||
|
xx via inet 10.0.1.2 dev r1-eth0 proto zebra
|
7
tests/topotests/ldp-topo1/r1/show_ipv4_route.ref-1
Normal file
7
tests/topotests/ldp-topo1/r1/show_ipv4_route.ref-1
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
O 1.1.1.1/32 [110/0] is directly connected, lo
|
||||||
|
O>* 2.2.2.2/32 [110/10] via 10.0.1.2, r1-eth0
|
||||||
|
O>* 3.3.3.3/32 [110/20] via 10.0.1.2, r1-eth0 label xxx
|
||||||
|
O>* 4.4.4.4/32 [110/20] via 10.0.1.2, r1-eth0 label xxx
|
||||||
|
O 10.0.1.0/24 [110/10] is directly connected, r1-eth0
|
||||||
|
O>* 10.0.2.0/24 [110/20] via 10.0.1.2, r1-eth0
|
||||||
|
O>* 10.0.3.0/24 [110/20] via 10.0.1.2, r1-eth0
|
@ -1,42 +1,8 @@
|
|||||||
1.1.1.1/32
|
AF Destination Nexthop Local Label Remote Label In Use
|
||||||
Local binding: label: imp-null
|
ipv4 1.1.1.1/32 2.2.2.2 imp-null xxx no
|
||||||
Remote bindings:
|
ipv4 2.2.2.2/32 2.2.2.2 xxx imp-null yes
|
||||||
Peer Label
|
ipv4 3.3.3.3/32 2.2.2.2 xxx xxx yes
|
||||||
----------------- ---------
|
ipv4 4.4.4.4/32 2.2.2.2 xxx xxx yes
|
||||||
2.2.2.2 xxx
|
ipv4 10.0.1.0/24 2.2.2.2 imp-null imp-null no
|
||||||
2.2.2.2/32
|
ipv4 10.0.2.0/24 2.2.2.2 xxx imp-null yes
|
||||||
Local binding: label: xxx
|
ipv4 10.0.3.0/24 2.2.2.2 xxx imp-null yes
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
3.3.3.3/32
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 xxx
|
|
||||||
4.4.4.4/32
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 xxx
|
|
||||||
10.0.1.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
10.0.2.0/24
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
10.0.3.0/24
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
|
42
tests/topotests/ldp-topo1/r1/show_mpls_ldp_binding.ref-1
Normal file
42
tests/topotests/ldp-topo1/r1/show_mpls_ldp_binding.ref-1
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
1.1.1.1/32
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
2.2.2.2/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
3.3.3.3/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
4.4.4.4/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
10.0.1.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
10.0.2.0/24
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
10.0.3.0/24
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
@ -1,7 +1,2 @@
|
|||||||
Local LDP Identifier: 1.1.1.1:0
|
AF ID Type Source Holdtime
|
||||||
Discovery Sources:
|
ipv4 2.2.2.2 Link r1-eth0 15
|
||||||
Interfaces:
|
|
||||||
r1-eth0: xmit/recv
|
|
||||||
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
|
||||||
Hold time: 15 sec
|
|
||||||
Targeted Hellos:
|
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
Local LDP Identifier: 1.1.1.1:0
|
||||||
|
Discovery Sources:
|
||||||
|
Interfaces:
|
||||||
|
r1-eth0: xmit/recv
|
||||||
|
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
||||||
|
Hold time: 15 sec
|
||||||
|
Targeted Hellos:
|
@ -0,0 +1,2 @@
|
|||||||
|
AF Interface State Uptime Hello Timers ac
|
||||||
|
ipv4 r1-eth0 ACTIVE xx:xx:xx 5/15 1
|
@ -1,8 +1,2 @@
|
|||||||
Peer LDP Identifier: 2.2.2.2:0
|
AF ID State Remote Address Uptime
|
||||||
TCP connection: 1.1.1.1:xxx - 2.2.2.2:xxx
|
ipv4 2.2.2.2 OPERATIONAL 2.2.2.2 xx:xx:xx
|
||||||
Session Holdtime: 180 sec
|
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r1-eth0
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
Peer LDP Identifier: 2.2.2.2:0
|
||||||
|
TCP connection: 1.1.1.1:xxx - 2.2.2.2:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r1-eth0
|
8
tests/topotests/ldp-topo1/r1/show_mpls_table.ref-1
Normal file
8
tests/topotests/ldp-topo1/r1/show_mpls_table.ref-1
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Inbound Outbound
|
||||||
|
Label Type Nexthop Label
|
||||||
|
-------- ------- --------------- --------
|
||||||
|
XX LDP 10.0.1.2 3
|
||||||
|
XX LDP 10.0.1.2 3
|
||||||
|
XX LDP 10.0.1.2 3
|
||||||
|
XX LDP 10.0.1.2 XX
|
||||||
|
XX LDP 10.0.1.2 XX
|
@ -1,7 +0,0 @@
|
|||||||
Inbound Outbound
|
|
||||||
Label Type Nexthop Label
|
|
||||||
-------- ------- --------------- --------
|
|
||||||
16 LDP 10.0.2.3 3
|
|
||||||
16 LDP 10.0.3.3 3
|
|
||||||
17 LDP 10.0.1.1 3
|
|
||||||
18 LDP 10.0.2.4 3
|
|
5
tests/topotests/ldp-topo1/r2/ip_mpls_route.ref-1
Normal file
5
tests/topotests/ldp-topo1/r2/ip_mpls_route.ref-1
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
xx proto zebra
|
||||||
|
nexthopvia inet 10.0.2.3 dev r2-eth1 weight 1
|
||||||
|
nexthopvia inet 10.0.3.3 dev r2-eth2 weight 1
|
||||||
|
xx via inet 10.0.1.1 dev r2-eth0 proto zebra
|
||||||
|
xx via inet 10.0.2.4 dev r2-eth1 proto zebra
|
7
tests/topotests/ldp-topo1/r2/show_ipv4_route.ref-1
Normal file
7
tests/topotests/ldp-topo1/r2/show_ipv4_route.ref-1
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
O>* 1.1.1.1/32 [110/10] via 10.0.1.1, r2-eth0
|
||||||
|
O 2.2.2.2/32 [110/0] is directly connected, lo
|
||||||
|
O>* 3.3.3.3/32 [110/10] via 10.0.2.3, r2-eth1
|
||||||
|
O>* 4.4.4.4/32 [110/10] via 10.0.2.4, r2-eth1
|
||||||
|
O 10.0.1.0/24 [110/10] is directly connected, r2-eth0
|
||||||
|
O 10.0.2.0/24 [110/10] is directly connected, r2-eth1
|
||||||
|
O 10.0.3.0/24 [110/10] is directly connected, r2-eth2
|
@ -1,56 +1,22 @@
|
|||||||
1.1.1.1/32
|
AF Destination Nexthop Local Label Remote Label In Use
|
||||||
Local binding: label: xxx
|
ipv4 1.1.1.1/32 1.1.1.1 xxx imp-null yes
|
||||||
Remote bindings:
|
ipv4 1.1.1.1/32 3.3.3.3 xxx xxx no
|
||||||
Peer Label
|
ipv4 1.1.1.1/32 4.4.4.4 xxx xxx no
|
||||||
----------------- ---------
|
ipv4 2.2.2.2/32 1.1.1.1 imp-null xxx no
|
||||||
1.1.1.1 imp-null
|
ipv4 2.2.2.2/32 3.3.3.3 imp-null xxx no
|
||||||
3.3.3.3 xxx
|
ipv4 2.2.2.2/32 4.4.4.4 imp-null xxx no
|
||||||
4.4.4.4 xxx
|
ipv4 3.3.3.3/32 1.1.1.1 xxx xxx no
|
||||||
2.2.2.2/32
|
ipv4 3.3.3.3/32 3.3.3.3 xxx imp-null yes
|
||||||
Local binding: label: imp-null
|
ipv4 3.3.3.3/32 4.4.4.4 xxx xxx no
|
||||||
Remote bindings:
|
ipv4 4.4.4.4/32 1.1.1.1 xxx xxx no
|
||||||
Peer Label
|
ipv4 4.4.4.4/32 3.3.3.3 xxx xxx no
|
||||||
----------------- ---------
|
ipv4 4.4.4.4/32 4.4.4.4 xxx imp-null yes
|
||||||
1.1.1.1 xxx
|
ipv4 10.0.1.0/24 1.1.1.1 imp-null imp-null no
|
||||||
3.3.3.3 xxx
|
ipv4 10.0.1.0/24 3.3.3.3 imp-null xxx no
|
||||||
4.4.4.4 xxx
|
ipv4 10.0.1.0/24 4.4.4.4 imp-null xxx no
|
||||||
3.3.3.3/32
|
ipv4 10.0.2.0/24 1.1.1.1 imp-null xxx no
|
||||||
Local binding: label: xxx
|
ipv4 10.0.2.0/24 3.3.3.3 imp-null imp-null no
|
||||||
Remote bindings:
|
ipv4 10.0.2.0/24 4.4.4.4 imp-null imp-null no
|
||||||
Peer Label
|
ipv4 10.0.3.0/24 1.1.1.1 imp-null xxx no
|
||||||
----------------- ---------
|
ipv4 10.0.3.0/24 3.3.3.3 imp-null imp-null no
|
||||||
1.1.1.1 xxx
|
ipv4 10.0.3.0/24 4.4.4.4 imp-null xxx no
|
||||||
3.3.3.3 imp-null
|
|
||||||
4.4.4.4 xxx
|
|
||||||
4.4.4.4/32
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
1.1.1.1 xxx
|
|
||||||
3.3.3.3 xxx
|
|
||||||
4.4.4.4 imp-null
|
|
||||||
10.0.1.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
1.1.1.1 imp-null
|
|
||||||
3.3.3.3 xxx
|
|
||||||
4.4.4.4 xxx
|
|
||||||
10.0.2.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
1.1.1.1 xxx
|
|
||||||
3.3.3.3 imp-null
|
|
||||||
4.4.4.4 imp-null
|
|
||||||
10.0.3.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
1.1.1.1 xxx
|
|
||||||
3.3.3.3 imp-null
|
|
||||||
4.4.4.4 xxx
|
|
||||||
|
56
tests/topotests/ldp-topo1/r2/show_mpls_ldp_binding.ref-1
Normal file
56
tests/topotests/ldp-topo1/r2/show_mpls_ldp_binding.ref-1
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
1.1.1.1/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 imp-null
|
||||||
|
3.3.3.3 xxx
|
||||||
|
4.4.4.4 xxx
|
||||||
|
2.2.2.2/32
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 xxx
|
||||||
|
3.3.3.3 xxx
|
||||||
|
4.4.4.4 xxx
|
||||||
|
3.3.3.3/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 xxx
|
||||||
|
3.3.3.3 imp-null
|
||||||
|
4.4.4.4 xxx
|
||||||
|
4.4.4.4/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 xxx
|
||||||
|
3.3.3.3 xxx
|
||||||
|
4.4.4.4 imp-null
|
||||||
|
10.0.1.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 imp-null
|
||||||
|
3.3.3.3 xxx
|
||||||
|
4.4.4.4 xxx
|
||||||
|
10.0.2.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 xxx
|
||||||
|
3.3.3.3 imp-null
|
||||||
|
4.4.4.4 imp-null
|
||||||
|
10.0.3.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
1.1.1.1 xxx
|
||||||
|
3.3.3.3 imp-null
|
||||||
|
4.4.4.4 xxx
|
@ -1,12 +1,4 @@
|
|||||||
Local LDP Identifier: 2.2.2.2:0
|
AF ID Type Source Holdtime
|
||||||
Discovery Sources:
|
ipv4 1.1.1.1 Link r2-eth0 15
|
||||||
Interfaces:
|
ipv4 3.3.3.3 Link r2-eth1 15
|
||||||
r2-eth0: xmit/recv
|
ipv4 4.4.4.4 Link r2-eth1 15
|
||||||
LDP Id: 1.1.1.1:0, Transport address: 1.1.1.1
|
|
||||||
Hold time: 15 sec
|
|
||||||
r2-eth1: xmit/recv
|
|
||||||
LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
|
|
||||||
Hold time: 15 sec
|
|
||||||
LDP Id: 4.4.4.4:0, Transport address: 4.4.4.4
|
|
||||||
Hold time: 15 sec
|
|
||||||
Targeted Hellos:
|
|
||||||
|
12
tests/topotests/ldp-topo1/r2/show_mpls_ldp_discovery.ref-1
Normal file
12
tests/topotests/ldp-topo1/r2/show_mpls_ldp_discovery.ref-1
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Local LDP Identifier: 2.2.2.2:0
|
||||||
|
Discovery Sources:
|
||||||
|
Interfaces:
|
||||||
|
r2-eth0: xmit/recv
|
||||||
|
LDP Id: 1.1.1.1:0, Transport address: 1.1.1.1
|
||||||
|
Hold time: 15 sec
|
||||||
|
r2-eth1: xmit/recv
|
||||||
|
LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
|
||||||
|
Hold time: 15 sec
|
||||||
|
LDP Id: 4.4.4.4:0, Transport address: 4.4.4.4
|
||||||
|
Hold time: 15 sec
|
||||||
|
Targeted Hellos:
|
@ -0,0 +1,3 @@
|
|||||||
|
AF Interface State Uptime Hello Timers ac
|
||||||
|
ipv4 r2-eth0 ACTIVE xx:xx:xx 5/15 1
|
||||||
|
ipv4 r2-eth1 ACTIVE xx:xx:xx 5/15 2
|
@ -1,26 +1,4 @@
|
|||||||
Peer LDP Identifier: 1.1.1.1:0
|
AF ID State Remote Address Uptime
|
||||||
TCP connection: 2.2.2.2:xxx - 1.1.1.1:xxx
|
ipv4 1.1.1.1 OPERATIONAL 1.1.1.1 xx:xx:xx
|
||||||
Session Holdtime: 180 sec
|
ipv4 3.3.3.3 OPERATIONAL 3.3.3.3 xx:xx:xx
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
ipv4 4.4.4.4 OPERATIONAL 4.4.4.4 xx:xx:xx
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r2-eth0
|
|
||||||
|
|
||||||
Peer LDP Identifier: 3.3.3.3:0
|
|
||||||
TCP connection: 2.2.2.2:xxx - 3.3.3.3:xxx
|
|
||||||
Session Holdtime: 180 sec
|
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r2-eth1
|
|
||||||
|
|
||||||
Peer LDP Identifier: 4.4.4.4:0
|
|
||||||
TCP connection: 2.2.2.2:xxx - 4.4.4.4:xxx
|
|
||||||
Session Holdtime: 180 sec
|
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r2-eth1
|
|
||||||
|
26
tests/topotests/ldp-topo1/r2/show_mpls_ldp_neighbor.ref-1
Normal file
26
tests/topotests/ldp-topo1/r2/show_mpls_ldp_neighbor.ref-1
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Peer LDP Identifier: 1.1.1.1:0
|
||||||
|
TCP connection: 2.2.2.2:xxx - 1.1.1.1:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r2-eth0
|
||||||
|
|
||||||
|
Peer LDP Identifier: 3.3.3.3:0
|
||||||
|
TCP connection: 2.2.2.2:xxx - 3.3.3.3:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r2-eth1
|
||||||
|
|
||||||
|
Peer LDP Identifier: 4.4.4.4:0
|
||||||
|
TCP connection: 2.2.2.2:xxx - 4.4.4.4:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r2-eth1
|
7
tests/topotests/ldp-topo1/r2/show_mpls_table.ref-1
Normal file
7
tests/topotests/ldp-topo1/r2/show_mpls_table.ref-1
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Inbound Outbound
|
||||||
|
Label Type Nexthop Label
|
||||||
|
-------- ------- --------------- --------
|
||||||
|
XX LDP 10.0.1.1 3
|
||||||
|
XX LDP 10.0.2.3 3
|
||||||
|
XX LDP 10.0.2.4 3
|
||||||
|
XX LDP 10.0.3.3 3
|
10
tests/topotests/ldp-topo1/r3/ip_mpls_route.ref-1
Normal file
10
tests/topotests/ldp-topo1/r3/ip_mpls_route.ref-1
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
xx proto zebra
|
||||||
|
nexthopvia inet 10.0.2.2 dev r3-eth0 weight 1
|
||||||
|
nexthopvia inet 10.0.3.2 dev r3-eth1 weight 1
|
||||||
|
xx proto zebra
|
||||||
|
nexthopvia inet 10.0.2.2 dev r3-eth0 weight 1
|
||||||
|
nexthopvia inet 10.0.3.2 dev r3-eth1 weight 1
|
||||||
|
xx proto zebra
|
||||||
|
nexthopvia inet 10.0.2.2 dev r3-eth0 weight 1
|
||||||
|
nexthopvia inet 10.0.3.2 dev r3-eth1 weight 1
|
||||||
|
xx via inet 10.0.2.4 dev r3-eth0 proto zebra
|
7
tests/topotests/ldp-topo1/r3/show_ipv4_route.ref-1
Normal file
7
tests/topotests/ldp-topo1/r3/show_ipv4_route.ref-1
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r3-eth0 label xxx
|
||||||
|
O>* 2.2.2.2/32 [110/10] via 10.0.2.2, r3-eth0
|
||||||
|
O 3.3.3.3/32 [110/0] is directly connected, lo
|
||||||
|
O>* 4.4.4.4/32 [110/10] via 10.0.2.4, r3-eth0
|
||||||
|
O>* 10.0.1.0/24 [110/20] via 10.0.2.2, r3-eth0
|
||||||
|
O 10.0.2.0/24 [110/10] is directly connected, r3-eth0
|
||||||
|
O 10.0.3.0/24 [110/10] is directly connected, r3-eth1
|
@ -1,49 +1,15 @@
|
|||||||
1.1.1.1/32
|
AF Destination Nexthop Local Label Remote Label In Use
|
||||||
Local binding: label: xxx
|
ipv4 1.1.1.1/32 2.2.2.2 xxx xxx yes
|
||||||
Remote bindings:
|
ipv4 1.1.1.1/32 4.4.4.4 xxx xxx no
|
||||||
Peer Label
|
ipv4 2.2.2.2/32 2.2.2.2 xxx imp-null yes
|
||||||
----------------- ---------
|
ipv4 2.2.2.2/32 4.4.4.4 xxx xxx no
|
||||||
2.2.2.2 xxx
|
ipv4 3.3.3.3/32 2.2.2.2 imp-null xxx no
|
||||||
4.4.4.4 xxx
|
ipv4 3.3.3.3/32 4.4.4.4 imp-null xxx no
|
||||||
2.2.2.2/32
|
ipv4 4.4.4.4/32 2.2.2.2 xxx xxx no
|
||||||
Local binding: label: xxx
|
ipv4 4.4.4.4/32 4.4.4.4 xxx imp-null yes
|
||||||
Remote bindings:
|
ipv4 10.0.1.0/24 2.2.2.2 xxx imp-null yes
|
||||||
Peer Label
|
ipv4 10.0.1.0/24 4.4.4.4 xxx xxx no
|
||||||
----------------- ---------
|
ipv4 10.0.2.0/24 2.2.2.2 imp-null imp-null no
|
||||||
2.2.2.2 imp-null
|
ipv4 10.0.2.0/24 4.4.4.4 imp-null imp-null no
|
||||||
4.4.4.4 xxx
|
ipv4 10.0.3.0/24 2.2.2.2 imp-null imp-null no
|
||||||
3.3.3.3/32
|
ipv4 10.0.3.0/24 4.4.4.4 imp-null xxx no
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 xxx
|
|
||||||
4.4.4.4 xxx
|
|
||||||
4.4.4.4/32
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 xxx
|
|
||||||
4.4.4.4 imp-null
|
|
||||||
10.0.1.0/24
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
4.4.4.4 xxx
|
|
||||||
10.0.2.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
4.4.4.4 imp-null
|
|
||||||
10.0.3.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
4.4.4.4 xxx
|
|
||||||
|
49
tests/topotests/ldp-topo1/r3/show_mpls_ldp_binding.ref-1
Normal file
49
tests/topotests/ldp-topo1/r3/show_mpls_ldp_binding.ref-1
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
1.1.1.1/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
4.4.4.4 xxx
|
||||||
|
2.2.2.2/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
4.4.4.4 xxx
|
||||||
|
3.3.3.3/32
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
4.4.4.4 xxx
|
||||||
|
4.4.4.4/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
4.4.4.4 imp-null
|
||||||
|
10.0.1.0/24
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
4.4.4.4 xxx
|
||||||
|
10.0.2.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
4.4.4.4 imp-null
|
||||||
|
10.0.3.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
4.4.4.4 xxx
|
@ -1,9 +1,3 @@
|
|||||||
Local LDP Identifier: 3.3.3.3:0
|
AF ID Type Source Holdtime
|
||||||
Discovery Sources:
|
ipv4 2.2.2.2 Link r3-eth0 15
|
||||||
Interfaces:
|
ipv4 4.4.4.4 Link r3-eth0 15
|
||||||
r3-eth0: xmit/recv
|
|
||||||
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
|
||||||
Hold time: 15 sec
|
|
||||||
LDP Id: 4.4.4.4:0, Transport address: 4.4.4.4
|
|
||||||
Hold time: 15 sec
|
|
||||||
Targeted Hellos:
|
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
Local LDP Identifier: 3.3.3.3:0
|
||||||
|
Discovery Sources:
|
||||||
|
Interfaces:
|
||||||
|
r3-eth0: xmit/recv
|
||||||
|
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
||||||
|
Hold time: 15 sec
|
||||||
|
LDP Id: 4.4.4.4:0, Transport address: 4.4.4.4
|
||||||
|
Hold time: 15 sec
|
||||||
|
Targeted Hellos:
|
@ -0,0 +1,2 @@
|
|||||||
|
AF Interface State Uptime Hello Timers ac
|
||||||
|
ipv4 r3-eth0 ACTIVE xx:xx:xx 5/15 2
|
@ -1,17 +1,3 @@
|
|||||||
Peer LDP Identifier: 2.2.2.2:0
|
AF ID State Remote Address Uptime
|
||||||
TCP connection: 3.3.3.3:xxx - 2.2.2.2:xxx
|
ipv4 2.2.2.2 OPERATIONAL 2.2.2.2 xx:xx:xx
|
||||||
Session Holdtime: 180 sec
|
ipv4 4.4.4.4 OPERATIONAL 4.4.4.4 xx:xx:xx
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r3-eth0
|
|
||||||
|
|
||||||
Peer LDP Identifier: 4.4.4.4:0
|
|
||||||
TCP connection: 3.3.3.3:xxx - 4.4.4.4:xxx
|
|
||||||
Session Holdtime: 180 sec
|
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r3-eth0
|
|
||||||
|
17
tests/topotests/ldp-topo1/r3/show_mpls_ldp_neighbor.ref-1
Normal file
17
tests/topotests/ldp-topo1/r3/show_mpls_ldp_neighbor.ref-1
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Peer LDP Identifier: 2.2.2.2:0
|
||||||
|
TCP connection: 3.3.3.3:xxx - 2.2.2.2:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r3-eth0
|
||||||
|
|
||||||
|
Peer LDP Identifier: 4.4.4.4:0
|
||||||
|
TCP connection: 3.3.3.3:xxx - 4.4.4.4:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r3-eth0
|
10
tests/topotests/ldp-topo1/r3/show_mpls_table.ref-1
Normal file
10
tests/topotests/ldp-topo1/r3/show_mpls_table.ref-1
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Inbound Outbound
|
||||||
|
Label Type Nexthop Label
|
||||||
|
-------- ------- --------------- --------
|
||||||
|
XX LDP 10.0.2.2 3
|
||||||
|
XX LDP 10.0.2.2 3
|
||||||
|
XX LDP 10.0.2.2 XX
|
||||||
|
XX LDP 10.0.2.4 3
|
||||||
|
XX LDP 10.0.3.2 3
|
||||||
|
XX LDP 10.0.3.2 3
|
||||||
|
XX LDP 10.0.3.2 XX
|
7
tests/topotests/ldp-topo1/r4/ip_mpls_route.ref-1
Normal file
7
tests/topotests/ldp-topo1/r4/ip_mpls_route.ref-1
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
xx proto zebra
|
||||||
|
nexthopvia inet 10.0.2.2 dev r4-eth0 weight 1
|
||||||
|
nexthopvia inet 10.0.2.3 dev r4-eth0 weight 1
|
||||||
|
xx as to xx via inet 10.0.2.2 dev r4-eth0 proto zebra
|
||||||
|
xx via inet 10.0.2.2 dev r4-eth0 proto zebra
|
||||||
|
xx via inet 10.0.2.2 dev r4-eth0 proto zebra
|
||||||
|
xx via inet 10.0.2.3 dev r4-eth0 proto zebra
|
7
tests/topotests/ldp-topo1/r4/show_ipv4_route.ref-1
Normal file
7
tests/topotests/ldp-topo1/r4/show_ipv4_route.ref-1
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
O>* 1.1.1.1/32 [110/20] via 10.0.2.2, r4-eth0 label xxx
|
||||||
|
O>* 2.2.2.2/32 [110/10] via 10.0.2.2, r4-eth0
|
||||||
|
O>* 3.3.3.3/32 [110/10] via 10.0.2.3, r4-eth0
|
||||||
|
O 4.4.4.4/32 [110/0] is directly connected, lo
|
||||||
|
O>* 10.0.1.0/24 [110/20] via 10.0.2.2, r4-eth0
|
||||||
|
O 10.0.2.0/24 [110/10] is directly connected, r4-eth0
|
||||||
|
O>* 10.0.3.0/24 [110/20] via 10.0.2.2, r4-eth0
|
@ -1,49 +1,15 @@
|
|||||||
1.1.1.1/32
|
AF Destination Nexthop Local Label Remote Label In Use
|
||||||
Local binding: label: xxx
|
ipv4 1.1.1.1/32 2.2.2.2 xxx xxx yes
|
||||||
Remote bindings:
|
ipv4 1.1.1.1/32 3.3.3.3 xxx xxx no
|
||||||
Peer Label
|
ipv4 2.2.2.2/32 2.2.2.2 xxx imp-null yes
|
||||||
----------------- ---------
|
ipv4 2.2.2.2/32 3.3.3.3 xxx xxx no
|
||||||
2.2.2.2 xxx
|
ipv4 3.3.3.3/32 2.2.2.2 xxx xxx no
|
||||||
3.3.3.3 xxx
|
ipv4 3.3.3.3/32 3.3.3.3 xxx imp-null yes
|
||||||
2.2.2.2/32
|
ipv4 4.4.4.4/32 2.2.2.2 imp-null xxx no
|
||||||
Local binding: label: xxx
|
ipv4 4.4.4.4/32 3.3.3.3 imp-null xxx no
|
||||||
Remote bindings:
|
ipv4 10.0.1.0/24 2.2.2.2 xxx imp-null yes
|
||||||
Peer Label
|
ipv4 10.0.1.0/24 3.3.3.3 xxx xxx no
|
||||||
----------------- ---------
|
ipv4 10.0.2.0/24 2.2.2.2 imp-null imp-null no
|
||||||
2.2.2.2 imp-null
|
ipv4 10.0.2.0/24 3.3.3.3 imp-null imp-null no
|
||||||
3.3.3.3 xxx
|
ipv4 10.0.3.0/24 2.2.2.2 xxx imp-null yes
|
||||||
3.3.3.3/32
|
ipv4 10.0.3.0/24 3.3.3.3 xxx imp-null yes
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 xxx
|
|
||||||
3.3.3.3 imp-null
|
|
||||||
4.4.4.4/32
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 xxx
|
|
||||||
3.3.3.3 xxx
|
|
||||||
10.0.1.0/24
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
3.3.3.3 xxx
|
|
||||||
10.0.2.0/24
|
|
||||||
Local binding: label: imp-null
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
3.3.3.3 imp-null
|
|
||||||
10.0.3.0/24
|
|
||||||
Local binding: label: xxx
|
|
||||||
Remote bindings:
|
|
||||||
Peer Label
|
|
||||||
----------------- ---------
|
|
||||||
2.2.2.2 imp-null
|
|
||||||
3.3.3.3 imp-null
|
|
||||||
|
49
tests/topotests/ldp-topo1/r4/show_mpls_ldp_binding.ref-1
Normal file
49
tests/topotests/ldp-topo1/r4/show_mpls_ldp_binding.ref-1
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
1.1.1.1/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
3.3.3.3 xxx
|
||||||
|
2.2.2.2/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
3.3.3.3 xxx
|
||||||
|
3.3.3.3/32
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
3.3.3.3 imp-null
|
||||||
|
4.4.4.4/32
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 xxx
|
||||||
|
3.3.3.3 xxx
|
||||||
|
10.0.1.0/24
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
3.3.3.3 xxx
|
||||||
|
10.0.2.0/24
|
||||||
|
Local binding: label: imp-null
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
3.3.3.3 imp-null
|
||||||
|
10.0.3.0/24
|
||||||
|
Local binding: label: xxx
|
||||||
|
Remote bindings:
|
||||||
|
Peer Label
|
||||||
|
----------------- ---------
|
||||||
|
2.2.2.2 imp-null
|
||||||
|
3.3.3.3 imp-null
|
@ -1,9 +1,3 @@
|
|||||||
Local LDP Identifier: 4.4.4.4:0
|
AF ID Type Source Holdtime
|
||||||
Discovery Sources:
|
ipv4 2.2.2.2 Link r4-eth0 15
|
||||||
Interfaces:
|
ipv4 3.3.3.3 Link r4-eth0 15
|
||||||
r4-eth0: xmit/recv
|
|
||||||
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
|
||||||
Hold time: 15 sec
|
|
||||||
LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
|
|
||||||
Hold time: 15 sec
|
|
||||||
Targeted Hellos:
|
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
Local LDP Identifier: 4.4.4.4:0
|
||||||
|
Discovery Sources:
|
||||||
|
Interfaces:
|
||||||
|
r4-eth0: xmit/recv
|
||||||
|
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
||||||
|
Hold time: 15 sec
|
||||||
|
LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
|
||||||
|
Hold time: 15 sec
|
||||||
|
Targeted Hellos:
|
@ -0,0 +1,2 @@
|
|||||||
|
AF Interface State Uptime Hello Timers ac
|
||||||
|
ipv4 r4-eth0 ACTIVE xx:xx:xx 5/15 2
|
@ -1,17 +1,3 @@
|
|||||||
Peer LDP Identifier: 2.2.2.2:0
|
AF ID State Remote Address Uptime
|
||||||
TCP connection: 4.4.4.4:xxx - 2.2.2.2:xxx
|
ipv4 2.2.2.2 OPERATIONAL 2.2.2.2 xx:xx:xx
|
||||||
Session Holdtime: 180 sec
|
ipv4 3.3.3.3 OPERATIONAL 3.3.3.3 xx:xx:xx
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r4-eth0
|
|
||||||
|
|
||||||
Peer LDP Identifier: 3.3.3.3:0
|
|
||||||
TCP connection: 4.4.4.4:xxx - 3.3.3.3:xxx
|
|
||||||
Session Holdtime: 180 sec
|
|
||||||
State: OPERATIONAL; Downstream-Unsolicited
|
|
||||||
Up time: xx:xx:xx
|
|
||||||
LDP Discovery Sources:
|
|
||||||
IPv4:
|
|
||||||
Interface: r4-eth0
|
|
||||||
|
17
tests/topotests/ldp-topo1/r4/show_mpls_ldp_neighbor.ref-1
Normal file
17
tests/topotests/ldp-topo1/r4/show_mpls_ldp_neighbor.ref-1
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Peer LDP Identifier: 2.2.2.2:0
|
||||||
|
TCP connection: 4.4.4.4:xxx - 2.2.2.2:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r4-eth0
|
||||||
|
|
||||||
|
Peer LDP Identifier: 3.3.3.3:0
|
||||||
|
TCP connection: 4.4.4.4:xxx - 3.3.3.3:xxx
|
||||||
|
Session Holdtime: 180 sec
|
||||||
|
State: OPERATIONAL; Downstream-Unsolicited
|
||||||
|
Up time: xx:xx:xx
|
||||||
|
LDP Discovery Sources:
|
||||||
|
IPv4:
|
||||||
|
Interface: r4-eth0
|
9
tests/topotests/ldp-topo1/r4/show_mpls_table.ref-1
Normal file
9
tests/topotests/ldp-topo1/r4/show_mpls_table.ref-1
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Inbound Outbound
|
||||||
|
Label Type Nexthop Label
|
||||||
|
-------- ------- --------------- --------
|
||||||
|
XX LDP 10.0.2.2 3
|
||||||
|
XX LDP 10.0.2.2 3
|
||||||
|
XX LDP 10.0.2.2 3
|
||||||
|
XX LDP 10.0.2.2 XX
|
||||||
|
XX LDP 10.0.2.3 3
|
||||||
|
XX LDP 10.0.2.3 3
|
@ -78,6 +78,12 @@ from lib import topotest
|
|||||||
|
|
||||||
fatal_error = ""
|
fatal_error = ""
|
||||||
|
|
||||||
|
# Expected version of CLI Output - Appendix to filename
|
||||||
|
# empty string = current, latest output (default)
|
||||||
|
# "-1" ... "-NNN" previous versions (incrementing with each version)
|
||||||
|
cli_version = ""
|
||||||
|
|
||||||
|
|
||||||
#####################################################
|
#####################################################
|
||||||
##
|
##
|
||||||
## Network Topology Definition
|
## Network Topology Definition
|
||||||
@ -159,6 +165,7 @@ def teardown_module(module):
|
|||||||
def test_router_running():
|
def test_router_running():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -173,12 +180,35 @@ def test_router_running():
|
|||||||
fatal_error = net['r%s' % i].checkRouterRunning()
|
fatal_error = net['r%s' % i].checkRouterRunning()
|
||||||
assert fatal_error == "", fatal_error
|
assert fatal_error == "", fatal_error
|
||||||
|
|
||||||
|
# Detect CLI Version
|
||||||
|
# At this time, there are only 2 possible outputs, so simple check
|
||||||
|
output = net['r1'].cmd('vtysh -c "show mpls ldp discovery" 2> /dev/null').rstrip()
|
||||||
|
|
||||||
|
# Check if old or new format of CLI Output. Default is to current format
|
||||||
|
#
|
||||||
|
# Old (v1) output looks like this:
|
||||||
|
# Local LDP Identifier: 1.1.1.1:0
|
||||||
|
# Discovery Sources:
|
||||||
|
# Interfaces:
|
||||||
|
# r1-eth0: xmit/recv
|
||||||
|
# LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
|
||||||
|
# Hold time: 15 sec
|
||||||
|
# Targeted Hellos:
|
||||||
|
#
|
||||||
|
# Current (v0) output looks like this:
|
||||||
|
# AF ID Type Source Holdtime
|
||||||
|
# ipv4 2.2.2.2 Link r1-eth0 15
|
||||||
|
pattern = re.compile("^Local LDP Identifier.*")
|
||||||
|
if pattern.match(output):
|
||||||
|
cli_version = "-1"
|
||||||
|
|
||||||
# For debugging after starting FRR/Quagga daemons, uncomment the next line
|
# For debugging after starting FRR/Quagga daemons, uncomment the next line
|
||||||
# CLI(net)
|
# CLI(net)
|
||||||
|
|
||||||
def test_mpls_interfaces():
|
def test_mpls_interfaces():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -191,7 +221,7 @@ def test_mpls_interfaces():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/show_mpls_ldp_interface.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/show_mpls_ldp_interface.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
@ -229,6 +259,7 @@ def test_mpls_interfaces():
|
|||||||
def test_mpls_ldp_neighbor_establish():
|
def test_mpls_ldp_neighbor_establish():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -243,7 +274,23 @@ def test_mpls_ldp_neighbor_establish():
|
|||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
# Look for any node not yet converged
|
# Look for any node not yet converged
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
established = net['r%s' % i].cmd('vtysh -c "show mpls ldp neighbor" 2> /dev/null')
|
established = net['r%s' % i].cmd('vtysh -c "show mpls ldp neighbor" 2> /dev/null').rstrip()
|
||||||
|
if cli_version != "-1":
|
||||||
|
# On current version, we need to make sure they all turn to OPERATIONAL on all lines
|
||||||
|
#
|
||||||
|
lines = ('\n'.join(established.splitlines()) + '\n').splitlines(1)
|
||||||
|
# Check all lines to be either table header (starting with ^AF or show OPERATIONAL)
|
||||||
|
header = r'^AF.*'
|
||||||
|
operational = r'^ip.*OPERATIONAL.*'
|
||||||
|
found_operational = 0
|
||||||
|
for j in range(1, len(lines)):
|
||||||
|
if (not re.search(header, lines[j])) and (not re.search(operational, lines[j])):
|
||||||
|
established = "" # Empty string shows NOT established
|
||||||
|
if re.search(operational, lines[j]):
|
||||||
|
found_operational += 1
|
||||||
|
if found_operational < 1:
|
||||||
|
# Need at least one operational neighbor
|
||||||
|
established = "" # Empty string shows NOT established
|
||||||
if not established:
|
if not established:
|
||||||
print('Waiting for r%s' %i)
|
print('Waiting for r%s' %i)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
@ -270,6 +317,7 @@ def test_mpls_ldp_neighbor_establish():
|
|||||||
def test_mpls_ldp_discovery():
|
def test_mpls_ldp_discovery():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -282,8 +330,11 @@ def test_mpls_ldp_discovery():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/show_mpls_ldp_discovery.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/show_mpls_ldp_discovery.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
|
# Actual output from router
|
||||||
|
actual = net['r%s' % i].cmd('vtysh -c "show mpls ldp discovery" 2> /dev/null').rstrip()
|
||||||
|
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
# Fix newlines (make them all the same)
|
# Fix newlines (make them all the same)
|
||||||
@ -316,6 +367,7 @@ def test_mpls_ldp_discovery():
|
|||||||
def test_mpls_ldp_neighbor():
|
def test_mpls_ldp_neighbor():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -328,7 +380,7 @@ def test_mpls_ldp_neighbor():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/show_mpls_ldp_neighbor.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/show_mpls_ldp_neighbor.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
@ -337,11 +389,19 @@ def test_mpls_ldp_neighbor():
|
|||||||
|
|
||||||
# Actual output from router
|
# Actual output from router
|
||||||
actual = net['r%s' % i].cmd('vtysh -c "show mpls ldp neighbor" 2> /dev/null').rstrip()
|
actual = net['r%s' % i].cmd('vtysh -c "show mpls ldp neighbor" 2> /dev/null').rstrip()
|
||||||
# Mask out Timer in Uptime
|
|
||||||
actual = re.sub(r"Up time: [0-9][0-9]:[0-9][0-9]:[0-9][0-9]", "Up time: xx:xx:xx", actual)
|
# Mask out changing parts in output
|
||||||
# Mask out Port numbers in TCP connection
|
if cli_version == "-1":
|
||||||
actual = re.sub(r"TCP connection: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]):[0-9]+ - ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]):[0-9]+",
|
# Mask out Timer in Uptime
|
||||||
r"TCP connection: \1:xxx - \2:xxx", actual)
|
actual = re.sub(r"Up time: [0-9][0-9]:[0-9][0-9]:[0-9][0-9]", "Up time: xx:xx:xx", actual)
|
||||||
|
# Mask out Port numbers in TCP connection
|
||||||
|
actual = re.sub(r"TCP connection: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]):[0-9]+ - ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]):[0-9]+",
|
||||||
|
r"TCP connection: \1:xxx - \2:xxx", actual)
|
||||||
|
else:
|
||||||
|
# Current Version
|
||||||
|
#
|
||||||
|
# Mask out Timer in Uptime
|
||||||
|
actual = re.sub(r"(ipv4 [0-9\.]+ +OPERATIONAL [0-9\.]+ +)[0-9][0-9]:[0-9][0-9]:[0-9][0-9]", r"\1xx:xx:xx", actual)
|
||||||
|
|
||||||
# Fix newlines (make them all the same)
|
# Fix newlines (make them all the same)
|
||||||
actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
|
actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
|
||||||
@ -367,6 +427,7 @@ def test_mpls_ldp_neighbor():
|
|||||||
def test_mpls_ldp_binding():
|
def test_mpls_ldp_binding():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip this test for now until proper sorting of the output
|
# Skip this test for now until proper sorting of the output
|
||||||
# is implemented
|
# is implemented
|
||||||
@ -383,7 +444,7 @@ def test_mpls_ldp_binding():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/show_mpls_ldp_binding.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/show_mpls_ldp_binding.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
@ -392,10 +453,19 @@ def test_mpls_ldp_binding():
|
|||||||
|
|
||||||
# Actual output from router
|
# Actual output from router
|
||||||
actual = net['r%s' % i].cmd('vtysh -c "show mpls ldp binding" 2> /dev/null').rstrip()
|
actual = net['r%s' % i].cmd('vtysh -c "show mpls ldp binding" 2> /dev/null').rstrip()
|
||||||
# Mask out label
|
|
||||||
actual = re.sub(r"label: [0-9]+", "label: xxx", actual)
|
# Mask out changing parts in output
|
||||||
actual = re.sub(r"(\s+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[ ]+)[0-9]+", r"\1xxx", actual)
|
if cli_version == "-1":
|
||||||
|
# Mask out label
|
||||||
|
actual = re.sub(r"label: [0-9]+", "label: xxx", actual)
|
||||||
|
actual = re.sub(r"(\s+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[ ]+)[0-9]+", r"\1xxx", actual)
|
||||||
|
else:
|
||||||
|
# Current Version
|
||||||
|
#
|
||||||
|
# Mask out label
|
||||||
|
actual = re.sub(r"(ipv4 [0-9\./]+ +[0-9\.]+ +)[0-9][0-9] (.*)", r"\1xxx\2", actual)
|
||||||
|
actual = re.sub(r"(ipv4 [0-9\./]+ +[0-9\.]+ +[a-z\-]+ +)[0-9][0-9] (.*)", r"\1xxx\2", actual)
|
||||||
|
|
||||||
# Fix newlines (make them all the same)
|
# Fix newlines (make them all the same)
|
||||||
actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
|
actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
|
||||||
|
|
||||||
@ -433,6 +503,7 @@ def test_mpls_ldp_binding():
|
|||||||
def test_zebra_ipv4_routingTable():
|
def test_zebra_ipv4_routingTable():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -445,7 +516,7 @@ def test_zebra_ipv4_routingTable():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/show_ipv4_route.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/show_ipv4_route.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
@ -483,6 +554,7 @@ def test_zebra_ipv4_routingTable():
|
|||||||
def test_mpls_table():
|
def test_mpls_table():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -495,7 +567,7 @@ def test_mpls_table():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/show_mpls_table.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/show_mpls_table.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
@ -547,6 +619,7 @@ def test_mpls_table():
|
|||||||
def test_linux_mpls_routes():
|
def test_linux_mpls_routes():
|
||||||
global fatal_error
|
global fatal_error
|
||||||
global net
|
global net
|
||||||
|
global cli_version
|
||||||
|
|
||||||
# Skip if previous fatal error condition is raised
|
# Skip if previous fatal error condition is raised
|
||||||
if (fatal_error != ""):
|
if (fatal_error != ""):
|
||||||
@ -559,7 +632,7 @@ def test_linux_mpls_routes():
|
|||||||
print("******************************************\n")
|
print("******************************************\n")
|
||||||
failures = 0
|
failures = 0
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
refTableFile = '%s/r%s/ip_mpls_route.ref' % (thisDir, i)
|
refTableFile = '%s/r%s/ip_mpls_route.ref%s' % (thisDir, i, cli_version)
|
||||||
if os.path.isfile(refTableFile):
|
if os.path.isfile(refTableFile):
|
||||||
# Read expected result from file
|
# Read expected result from file
|
||||||
expected = open(refTableFile).read().rstrip()
|
expected = open(refTableFile).read().rstrip()
|
||||||
|
Loading…
Reference in New Issue
Block a user