diff options
| author | Russ White <russ@riw.us> | 2022-02-23 16:45:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-23 16:45:36 -0500 |
| commit | 1e982fdbdf306583dc597d4f7fd3d044e89dd93d (patch) | |
| tree | 518c50c30eca65d9f2f479a8c1023ccd1d35c779 /tests/topotests/lib/common_config.py | |
| parent | eaba619fc183f68a456b3918f449185b3b477426 (diff) | |
| parent | 9c46c484fe52d05ec05fa86b0fa2a8f616e0a880 (diff) | |
Merge pull request #10385 from iqras23/nh
zebra: Nexthop tracking, route resolution recursive lookup
Diffstat (limited to 'tests/topotests/lib/common_config.py')
| -rw-r--r-- | tests/topotests/lib/common_config.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index f538b5a52b..c0572fca4c 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -1195,7 +1195,7 @@ def add_interfaces_to_vlan(tgen, input_dict): # Assigning IP address ifaddr = ipaddress.ip_interface( - u"{}/{}".format( + "{}/{}".format( frr_unicode(data["ip"]), frr_unicode(data["subnet"]) ) ) @@ -1626,7 +1626,7 @@ def create_interface_in_kernel( ifaddr = ipaddress.ip_interface(frr_unicode(ip_addr)) else: ifaddr = ipaddress.ip_interface( - u"{}/{}".format(frr_unicode(ip_addr), frr_unicode(netmask)) + "{}/{}".format(frr_unicode(ip_addr), frr_unicode(netmask)) ) cmd = "ip -{0} a flush {1} scope global && ip a add {2} dev {1} && ip l set {1} up".format( ifaddr.version, name, ifaddr @@ -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 |
