Fixing existing ldp-topol test to validate MPLS LDP CLI output.
Signed-off-by: Karen Schoener <karen@voltanet.io>
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
+ # Verify MPLS Interfaces
print("\n\n** Verifying MPLS Interfaces")
print("******************************************\n")
failures = 0
print("\n\n** Verifying MPLS Interfaces")
print("******************************************\n")
failures = 0
if (fatal_error != ""):
pytest.skip(fatal_error)
if (fatal_error != ""):
pytest.skip(fatal_error)
- # Wait for OSPF6 to converge (All Neighbors in either Full or TwoWay State)
+ # Wait for MPLS LDP neighbors to establish.
print("\n\n** Verify MPLS LDP neighbors to establish")
print("******************************************\n")
timeout = 90
print("\n\n** Verify MPLS LDP neighbors to establish")
print("******************************************\n")
timeout = 90
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
+ # Verify MPLS LDP discovery
print("\n\n** Verifying MPLS LDP discovery")
print("******************************************\n")
failures = 0
for i in range(1, 5):
print("\n\n** Verifying MPLS LDP discovery")
print("******************************************\n")
failures = 0
for i in range(1, 5):
- refTableFile = '%s/r%s/show_mpls_ldp_discovery.ref'
+ refTableFile = '%s/r%s/show_mpls_ldp_discovery.ref' % (thisDir, i)
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()
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()
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
+ # Verify MPLS LDP neighbor
print("\n\n** Verifying MPLS LDP neighbor")
print("******************************************\n")
failures = 0
for i in range(1, 5):
print("\n\n** Verifying MPLS LDP neighbor")
print("******************************************\n")
failures = 0
for i in range(1, 5):
- refTableFile = '%s/r%s/show_mpls_ldp_neighbor.ref'
+ refTableFile = '%s/r%s/show_mpls_ldp_neighbor.ref' % (thisDir, i)
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read().rstrip()
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read().rstrip()
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
+ # Verify MPLS LDP binding
print("\n\n** Verifying MPLS LDP binding")
print("******************************************\n")
failures = 0
for i in range(1, 5):
print("\n\n** Verifying MPLS LDP binding")
print("******************************************\n")
failures = 0
for i in range(1, 5):
- refTableFile = '%s/r%s/show_mpls_ldp_binding.ref'
+ refTableFile = '%s/r%s/show_mpls_ldp_binding.ref' % (thisDir, i)
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read().rstrip()
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read().rstrip()
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
+ # Verify Zebra IPv4 Routing Table
print("\n\n** Verifying Zebra IPv4 Routing Table")
print("******************************************\n")
failures = 0
for i in range(1, 5):
print("\n\n** Verifying Zebra IPv4 Routing Table")
print("******************************************\n")
failures = 0
for i in range(1, 5):
- refTableFile = '%s/r%s/show_ipv4_route.ref'
+ refTableFile = '%s/r%s/show_ipv4_route.ref' % (thisDir, i)
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read().rstrip()
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read().rstrip()
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
print("\n\n** Verifying MPLS table")
print("******************************************\n")
failures = 0
for i in range(1, 5):
print("\n\n** Verifying MPLS table")
print("******************************************\n")
failures = 0
for i in range(1, 5):
- refTableFile = '%s/r%s/show_mpls_table.ref'
+ refTableFile = '%s/r%s/show_mpls_table.ref' % (thisDir, i)
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read()
if os.path.isfile(refTableFile):
# Read expected result from file
expected = open(refTableFile).read()
# Actual output from router
actual = net['r%s' % i].cmd('vtysh -c "show mpls table" 2> /dev/null')
# Actual output from router
actual = net['r%s' % i].cmd('vtysh -c "show mpls table" 2> /dev/null')
# Fix inconsistent Label numbers at beginning of line
actual = re.sub(r"(\s+)[0-9]+(\s+LDP)", r"\1XX\2", actual)
# Fix inconsistent Label numbers at end of line
# Fix inconsistent Label numbers at beginning of line
actual = re.sub(r"(\s+)[0-9]+(\s+LDP)", r"\1XX\2", actual)
# Fix inconsistent Label numbers at end of line
thisDir = os.path.dirname(os.path.realpath(__file__))
thisDir = os.path.dirname(os.path.realpath(__file__))
- # Verify OSPFv3 Routing Table
+ # Verify Linux Kernel MPLS routes
print("\n\n** Verifying Linux Kernel MPLS routes")
print("******************************************\n")
failures = 0
print("\n\n** Verifying Linux Kernel MPLS routes")
print("******************************************\n")
failures = 0