]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldp-topo1: Support implicit-null and old format on "show_mpls_table"
authorMartin Winter <mwinter@opensourcerouting.org>
Wed, 14 Feb 2018 02:09:41 +0000 (18:09 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:13 +0000 (20:22 -0500)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
tests/topotests/ldp-topo1/r1/show_mpls_table.ref
tests/topotests/ldp-topo1/r1/show_mpls_table.ref-no-impl-null [new file with mode: 0644]
tests/topotests/ldp-topo1/r2/show_mpls_table.ref
tests/topotests/ldp-topo1/r2/show_mpls_table.ref-no-impl-null [new file with mode: 0644]
tests/topotests/ldp-topo1/r3/show_mpls_table.ref
tests/topotests/ldp-topo1/r3/show_mpls_table.ref-no-impl-null [new file with mode: 0644]
tests/topotests/ldp-topo1/r4/show_mpls_table.ref
tests/topotests/ldp-topo1/r4/show_mpls_table.ref-no-impl-null [new file with mode: 0644]
tests/topotests/ldp-topo1/test_ldp_topo1.py

index 912a0820195f5bcaaa817a01b4deff5bcb1c32a8..61cb9eec82617fc0e5b63083a3f4ceece7c298f2 100644 (file)
@@ -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
diff --git a/tests/topotests/ldp-topo1/r1/show_mpls_table.ref-no-impl-null b/tests/topotests/ldp-topo1/r1/show_mpls_table.ref-no-impl-null
new file mode 100644 (file)
index 0000000..912a082
--- /dev/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
index ba244e76ec01d279c4379ff9018b8ed4f1b4325c..46420ccd11727e5d70d8fb7516f5b9269b82d7c6 100644 (file)
@@ -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
diff --git a/tests/topotests/ldp-topo1/r2/show_mpls_table.ref-no-impl-null b/tests/topotests/ldp-topo1/r2/show_mpls_table.ref-no-impl-null
new file mode 100644 (file)
index 0000000..ba244e7
--- /dev/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
index 9198969bd54f01b6f6466df7979e963a5960009e..c367f240f4248545faf6e8d1b1af7b7ebf284154 100644 (file)
@@ -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
diff --git a/tests/topotests/ldp-topo1/r3/show_mpls_table.ref-no-impl-null b/tests/topotests/ldp-topo1/r3/show_mpls_table.ref-no-impl-null
new file mode 100644 (file)
index 0000000..9198969
--- /dev/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
index b8cf5a2702d6ead6fe81c8406754c2f42dc4f2d4..9f86cd67cc8d71441cd5e250a7daa705d4ffc7c3 100644 (file)
@@ -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
diff --git a/tests/topotests/ldp-topo1/r4/show_mpls_table.ref-no-impl-null b/tests/topotests/ldp-topo1/r4/show_mpls_table.ref-no-impl-null
new file mode 100644 (file)
index 0000000..b8cf5a2
--- /dev/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
index c8ea438cce788f862d565244683a78d313b0657e..4a07a990868fe3765d5bbca829887e5c4b97abc4 100755 (executable)
@@ -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()