mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-16 20:43:41 +00:00
Merge pull request #7688 from kuldeepkash/bgp_multi_vrf
tests: Enhanced auto-rd verification logic for evpn_type5 tests
This commit is contained in:
commit
dfe719ca78
@ -3762,7 +3762,7 @@ def verify_attributes_for_evpn_routes(
|
|||||||
logger.info(
|
logger.info(
|
||||||
"[DUT %s]: Verifying RD value for"
|
"[DUT %s]: Verifying RD value for"
|
||||||
" EVPN route: %s [PASSED]|| "
|
" EVPN route: %s [PASSED]|| "
|
||||||
"Found Exprected: %s",
|
"Found Expected: %s",
|
||||||
dut,
|
dut,
|
||||||
route,
|
route,
|
||||||
rd,
|
rd,
|
||||||
@ -3808,34 +3808,33 @@ def verify_attributes_for_evpn_routes(
|
|||||||
continue
|
continue
|
||||||
router_id = afi_data["routerId"]
|
router_id = afi_data["routerId"]
|
||||||
|
|
||||||
|
found = False
|
||||||
rd = "{}:{}".format(router_id, vni_dict[vrf])
|
rd = "{}:{}".format(router_id, vni_dict[vrf])
|
||||||
if rd in evpn_rd_value_json:
|
for _rd, rd_value_json in evpn_rd_value_json.items():
|
||||||
rd_value_json = evpn_rd_value_json[rd]
|
if (
|
||||||
if rd_value_json["rd"] != rd:
|
str(rd_value_json["rd"].split(":")[0])
|
||||||
errormsg = (
|
!= rd.split(":")[0]
|
||||||
"[DUT: %s] Failed: Verifying"
|
):
|
||||||
" RD value for EVPN route: %s"
|
continue
|
||||||
"[FAILED]!!, EXPECTED : %s "
|
|
||||||
" FOUND : %s"
|
|
||||||
% (dut, route, rd, rd_value_json["rd"])
|
|
||||||
)
|
|
||||||
return errormsg
|
|
||||||
|
|
||||||
else:
|
if int(rd_value_json["rd"].split(":")[1]) > 0:
|
||||||
logger.info(
|
found = True
|
||||||
"[DUT %s]: Verifying RD value for"
|
|
||||||
" EVPN route: %s [PASSED]|| "
|
|
||||||
"Found Exprected: %s",
|
|
||||||
dut,
|
|
||||||
route,
|
|
||||||
rd,
|
|
||||||
)
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
if found:
|
||||||
|
logger.info(
|
||||||
|
"[DUT %s]: Verifying RD value for"
|
||||||
|
" EVPN route: %s "
|
||||||
|
"Found Expected: %s",
|
||||||
|
dut,
|
||||||
|
route,
|
||||||
|
rd_value_json["rd"],
|
||||||
|
)
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
errormsg = (
|
errormsg = (
|
||||||
"[DUT: %s] RD : %s is not present"
|
"[DUT: %s] Failed: Verifying"
|
||||||
" in cli json output" % (dut, rd)
|
" RD value for EVPN route: %s"
|
||||||
|
" FOUND : %s" % (dut, route, rd_value_json["rd"])
|
||||||
)
|
)
|
||||||
return errormsg
|
return errormsg
|
||||||
|
|
||||||
@ -3908,7 +3907,7 @@ def verify_attributes_for_evpn_routes(
|
|||||||
"[DUT %s]: Verifying "
|
"[DUT %s]: Verifying "
|
||||||
"RT value for EVPN "
|
"RT value for EVPN "
|
||||||
"route: %s [PASSED]||"
|
"route: %s [PASSED]||"
|
||||||
"Found Exprected: %s",
|
"Found Expected: %s",
|
||||||
dut,
|
dut,
|
||||||
route,
|
route,
|
||||||
rt_input,
|
rt_input,
|
||||||
@ -3957,7 +3956,7 @@ def verify_attributes_for_evpn_routes(
|
|||||||
"[DUT %s]: Verifying RT"
|
"[DUT %s]: Verifying RT"
|
||||||
" value for EVPN route:"
|
" value for EVPN route:"
|
||||||
" %s [PASSED]|| "
|
" %s [PASSED]|| "
|
||||||
"Found Exprected: %s",
|
"Found Expected: %s",
|
||||||
dut,
|
dut,
|
||||||
route,
|
route,
|
||||||
rt_input,
|
rt_input,
|
||||||
@ -4001,7 +4000,7 @@ def verify_attributes_for_evpn_routes(
|
|||||||
"[DUT %s]: RD: %s, Verifying "
|
"[DUT %s]: RD: %s, Verifying "
|
||||||
"ethTag value for EVPN route:"
|
"ethTag value for EVPN route:"
|
||||||
" %s [PASSED]|| "
|
" %s [PASSED]|| "
|
||||||
"Found Exprected: %s",
|
"Found Expected: %s",
|
||||||
dut,
|
dut,
|
||||||
_rd,
|
_rd,
|
||||||
route,
|
route,
|
||||||
@ -4041,7 +4040,7 @@ def verify_attributes_for_evpn_routes(
|
|||||||
"[DUT %s]: RD: %s, Verifying "
|
"[DUT %s]: RD: %s, Verifying "
|
||||||
"ipLen value for EVPN route:"
|
"ipLen value for EVPN route:"
|
||||||
" %s [PASSED]|| "
|
" %s [PASSED]|| "
|
||||||
"Found Exprected: %s",
|
"Found Expected: %s",
|
||||||
dut,
|
dut,
|
||||||
_rd,
|
_rd,
|
||||||
route,
|
route,
|
||||||
|
Loading…
Reference in New Issue
Block a user