tests: Enhanced the lib bgp.py for nexthop check

1. Enhanced the lib bgp.py for nexthop check

Signed-off-by: naveen <nguggarigoud@vmware.com>
This commit is contained in:
Naveen Guggarigoudar 2020-07-07 09:47:51 -07:00 committed by Vijay Kumar Gupta
parent eee0457da7
commit f8f6dbe9f7

View File

@ -2639,19 +2639,19 @@ def verify_bgp_rib(tgen, addr_type, dut, input_dict, next_hop=None, aspath=None)
missing_list_of_nexthops = set(list2).difference( missing_list_of_nexthops = set(list2).difference(
list1 list1
) )
additional_nexthops_in_required_nhs = set( additional_nexthops_in_required_nhs = set(
list1 list1
).difference(list2) ).difference(list2)
if list2: if list2:
if additional_nexthops_in_required_nhs: if additional_nexthops_in_required_nhs:
logger.info( logger.info(
"Missing nexthop %s for route" "Missing nexthop %s for route"
" %s in RIB of router %s\n", " %s in RIB of router %s\n",
additional_nexthops_in_required_nhs, additional_nexthops_in_required_nhs,
st_rt, st_rt,
dut, dut,
) )
return errormsg return errormsg
else: else:
nh_found = True nh_found = True