mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-06 01:40:45 +00:00
ldp-topo1: Support implicit-null and old format on "show_mpls_table"
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
parent
a209417da6
commit
d01e89f168
@ -1,8 +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
|
||||
XX LDP 10.0.1.2 implicit-null
|
||||
XX LDP 10.0.1.2 implicit-null
|
||||
XX LDP 10.0.1.2 implicit-null
|
||||
|
||||
@ -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 +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
|
||||
XX LDP 10.0.1.1 implicit-null
|
||||
XX LDP 10.0.2.3 implicit-null
|
||||
XX LDP 10.0.2.4 implicit-null
|
||||
XX LDP 10.0.3.3 implicit-null
|
||||
|
||||
@ -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
|
||||
@ -1,10 +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.2.2 implicit-null
|
||||
XX LDP 10.0.2.2 implicit-null
|
||||
XX LDP 10.0.2.4 implicit-null
|
||||
XX LDP 10.0.3.2 XX
|
||||
XX LDP 10.0.3.2 implicit-null
|
||||
XX LDP 10.0.3.2 implicit-null
|
||||
|
||||
@ -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
|
||||
@ -1,9 +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
|
||||
XX LDP 10.0.2.2 implicit-null
|
||||
XX LDP 10.0.2.2 implicit-null
|
||||
XX LDP 10.0.2.2 implicit-null
|
||||
XX LDP 10.0.2.3 implicit-null
|
||||
XX LDP 10.0.2.3 implicit-null
|
||||
|
||||
@ -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
|
||||
@ -606,8 +606,16 @@ def test_mpls_table():
|
||||
print("\n\n** Verifying MPLS table")
|
||||
print("******************************************\n")
|
||||
failures = 0
|
||||
|
||||
version = cli_version
|
||||
if (version == ""):
|
||||
# check for new output without implicit-null
|
||||
output = net['r1'].cmd('vtysh -c "show mpls table" 2> /dev/null').rstrip()
|
||||
if 'LDP 10.0.1.2 3' in output:
|
||||
version = "-no-impl-null"
|
||||
|
||||
for i in range(1, 5):
|
||||
refTableFile = '%s/r%s/show_mpls_table.ref%s' % (thisDir, i, cli_version)
|
||||
refTableFile = '%s/r%s/show_mpls_table.ref%s' % (thisDir, i, version)
|
||||
if os.path.isfile(refTableFile):
|
||||
# Read expected result from file
|
||||
expected = open(refTableFile).read().rstrip()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user