]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldpd: update topo tests for new show isis ldp-sync command output 7132/head
authorlynne <lynne@voltanet.io>
Mon, 21 Sep 2020 15:55:47 +0000 (11:55 -0400)
committerlynne <lynne@voltanet.io>
Mon, 21 Sep 2020 16:07:13 +0000 (12:07 -0400)
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
tests/topotests/ldp-sync-isis-topo1/r1/show_isis_ldp_sync_r1_eth1_shutdown.ref
tests/topotests/ldp-sync-isis-topo1/r2/show_isis_ldp_sync_r2_eth1_shutdown.ref
tests/topotests/ldp-sync-isis-topo1/test_ldp_sync_isis_topo1.py

index c63bbea77f42841d2d9206c12edb1dfa96d3b632..c28cd4cc7ddf9c87b5256cb3c9e4765bf952306b 100644 (file)
@@ -1,8 +1,6 @@
 {
   "r1-eth1":{
-    "ldpIgpSyncEnabled":true,
-    "holdDownTimeInSec":0,
-    "ldpIgpSyncState":"Sync not achieved"
+    "Interface":true
   },
   "r1-eth2":{
     "ldpIgpSyncEnabled":true,
index 2f3eae47c8d579fd5c9838fd51045afe887f4f8f..c3d97a3c735ae57d51583423a202d6ca50373f31 100644 (file)
@@ -1,8 +1,6 @@
 {
   "r2-eth1":{
-    "ldpIgpSyncEnabled":true,
-    "holdDownTimeInSec":0,
-    "ldpIgpSyncState":"Sync not achieved"
+    "Interface":true
   },
   "r2-eth2":{
     "ldpIgpSyncEnabled":false,
index 1dce698c177dc90b4a6aaa56cebaff78350af5bb..807b00ffa1d3dd1baca4da2a3dfeb07b707eb027 100755 (executable)
@@ -470,16 +470,17 @@ def parse_show_isis_ldp_sync(lines, rname):
 
             if line.startswith(" LDP-IGP Synchronization enabled: "):
                 interface["ldpIgpSyncEnabled"] = line.endswith("yes")
+                line = it.next();
 
-            line = it.next();
-
-            if line.startswith(" holddown timer in seconds: "):
-                interface["holdDownTimeInSec"] = int(line.split(": ")[-1])
+                if line.startswith(" holddown timer in seconds: "):
+                     interface["holdDownTimeInSec"] = int(line.split(": ")[-1])
+                     line = it.next();
 
-            line = it.next();
+                if line.startswith(" State: "):
+                     interface["ldpIgpSyncState"] = line.split(": ")[-1]
 
-            if line.startswith(" State: "):
-                interface["ldpIgpSyncState"] = line.split(": ")[-1]
+            elif line.startswith(" Interface "):
+                interface["Interface"] = line.endswith("down")
 
             interfaces[interface_name] = interface