summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/common_config.py
diff options
context:
space:
mode:
authorIqra Siddiqui <imujeebsiddi@vmware.com>2022-02-17 01:58:15 -0800
committerIqra Siddiqui <imujeebsiddi@vmware.com>2022-02-22 09:28:00 -0800
commit055f21c49d8310051d73b7ff67c28034dfacf4ce (patch)
treed815dcc647f54127b0062189aa314d246b62bbc5 /tests/topotests/lib/common_config.py
parent1b1e934facb2f57278a193367a0473817eefba8a (diff)
tests: Add supporting test to validate NH resolution logic
Co-authored-by: Vijay Kumar Gupta <vijayg@vmware.com> Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
Diffstat (limited to 'tests/topotests/lib/common_config.py')
-rw-r--r--tests/topotests/lib/common_config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index f538b5a52b..0defe1359d 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -4921,8 +4921,13 @@ def verify_ip_nht(tgen, input_dict):
for nh in nh_list:
if nh in show_ip_nht:
- logger.info("Nexthop %s is resolved on %s", nh, router)
- return True
+ nht = run_frr_cmd(rnode, f"show ip nht {nh}")
+ if "unresolved" in nht:
+ errormsg = "Nexthop {} became unresolved on {}".format(nh, router)
+ return errormsg
+ else:
+ logger.info("Nexthop %s is resolved on %s", nh, router)
+ return True
else:
errormsg = "Nexthop {} is resolved on {}".format(nh, router)
return errormsg