From e82329ef204cdfb35f67f9a4975691c9a81e96ad Mon Sep 17 00:00:00 2001 From: lynne Date: Mon, 21 Sep 2020 11:55:47 -0400 Subject: [PATCH] ldpd: update topo tests for new show isis ldp-sync command output Signed-off-by: Lynne Morrison --- .../r1/show_isis_ldp_sync_r1_eth1_shutdown.ref | 4 +--- .../r2/show_isis_ldp_sync_r2_eth1_shutdown.ref | 4 +--- .../test_ldp_sync_isis_topo1.py | 15 ++++++++------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/topotests/ldp-sync-isis-topo1/r1/show_isis_ldp_sync_r1_eth1_shutdown.ref b/tests/topotests/ldp-sync-isis-topo1/r1/show_isis_ldp_sync_r1_eth1_shutdown.ref index c63bbea77f..c28cd4cc7d 100644 --- a/tests/topotests/ldp-sync-isis-topo1/r1/show_isis_ldp_sync_r1_eth1_shutdown.ref +++ b/tests/topotests/ldp-sync-isis-topo1/r1/show_isis_ldp_sync_r1_eth1_shutdown.ref @@ -1,8 +1,6 @@ { "r1-eth1":{ - "ldpIgpSyncEnabled":true, - "holdDownTimeInSec":0, - "ldpIgpSyncState":"Sync not achieved" + "Interface":true }, "r1-eth2":{ "ldpIgpSyncEnabled":true, diff --git a/tests/topotests/ldp-sync-isis-topo1/r2/show_isis_ldp_sync_r2_eth1_shutdown.ref b/tests/topotests/ldp-sync-isis-topo1/r2/show_isis_ldp_sync_r2_eth1_shutdown.ref index 2f3eae47c8..c3d97a3c73 100644 --- a/tests/topotests/ldp-sync-isis-topo1/r2/show_isis_ldp_sync_r2_eth1_shutdown.ref +++ b/tests/topotests/ldp-sync-isis-topo1/r2/show_isis_ldp_sync_r2_eth1_shutdown.ref @@ -1,8 +1,6 @@ { "r2-eth1":{ - "ldpIgpSyncEnabled":true, - "holdDownTimeInSec":0, - "ldpIgpSyncState":"Sync not achieved" + "Interface":true }, "r2-eth2":{ "ldpIgpSyncEnabled":false, diff --git a/tests/topotests/ldp-sync-isis-topo1/test_ldp_sync_isis_topo1.py b/tests/topotests/ldp-sync-isis-topo1/test_ldp_sync_isis_topo1.py index 1dce698c17..807b00ffa1 100755 --- a/tests/topotests/ldp-sync-isis-topo1/test_ldp_sync_isis_topo1.py +++ b/tests/topotests/ldp-sync-isis-topo1/test_ldp_sync_isis_topo1.py @@ -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 -- 2.39.5