# Add static routes
input_dict = {
- fhr: {"static_routes": [{"network": bsr_route, "next_hop": next_hop}]},
rp: {"static_routes": [{"network": bsr_route, "next_hop": next_hop_rp}]},
lhr: {"static_routes": [{"network": bsr_route, "next_hop": next_hop_lhr}]},
}
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- for dut, _nexthop in zip([fhr, rp, lhr], [next_hop, next_hop_rp, next_hop_lhr]):
+ for dut, _nexthop in zip([rp, lhr], [next_hop_rp, next_hop_lhr]):
input_routes = {dut: input_dict[dut]}
- result = verify_rib(tgen, "ipv4", dut, input_routes, _nexthop)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_routes, _nexthop, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", fhr, input_dict, next_hop_fhr)
+ result = verify_rib(
+ tgen, "ipv4", fhr, input_dict, next_hop_fhr, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", lhr, input_dict, next_hop_lhr)
+ result = verify_rib(
+ tgen, "ipv4", lhr, input_dict, next_hop_lhr, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
# Verifying static routes are installed
for dut, _nexthop in zip(["i1", "l1"], [next_hop_rp, next_hop_lhr]):
input_routes = {dut: input_dict[dut]}
- result = verify_rib(tgen, "ipv4", dut, input_routes, _nexthop)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_routes, _nexthop, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
input_routes = {
"f1": {"static_routes": [{"network": bsr_add, "next_hop": next_hop}]}
}
- result = verify_rib(tgen, "ipv4", "f1", input_routes, next_hop)
+ result = verify_rib(
+ tgen, "ipv4", "f1", input_routes, next_hop, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
# Verifying static routes are installed
for dut, _nexthop in zip(["i1", "l1"], [next_hop_rp, next_hop_lhr]):
input_routes = {dut: input_dict[dut]}
- result = verify_rib(tgen, "ipv4", dut, input_routes, _nexthop)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_routes, _nexthop, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
input_routes = {
"f1": {"static_routes": [{"network": CRP, "next_hop": next_hop_fhr}]}
}
- result = verify_rib(tgen, "ipv4", "f1", input_routes, expected=False)
+ result = verify_rib(
+ tgen, "ipv4", "f1", input_routes, protocol="static", expected=False
+ )
assert (
result is not True
), "Testcase {} : Failed \n " "Route is still present \n Error {}".format(
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", "f1", input_dict)
+ result = verify_rib(tgen, "ipv4", "f1", input_dict, protocol="static")
assert result is True, "Testcase {} : Failed \n Error {}".format(tc_name, result)
intf_f1_i1 = topo["routers"]["f1"]["links"]["i1"]["interface"]
input_dict = {
"f1": {"static_routes": [{"network": BSR1_ADDR, "next_hop": NEXT_HOP1}]}
}
- result = verify_rib(tgen, "ipv4", "f1", input_dict, NEXT_HOP1)
+ result = verify_rib(tgen, "ipv4", "f1", input_dict, NEXT_HOP1, protocol="static")
assert result is True, "Testcase {} : Failed \n Error {}".format(tc_name, result)
input_dict = {
]
}
}
- result = verify_rib(tgen, "ipv4", "f1", input_dict, expected=False)
+ result = verify_rib(
+ tgen, "ipv4", "f1", input_dict, protocol="static", expected=False
+ )
assert result is not True, (
"Testcase {} : Failed \n "
"Routes:[{}, {}] are still present \n Error {}".format(
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", "l1", input_dict, expected=False)
+ result = verify_rib(
+ tgen, "ipv4", "l1", input_dict, protocol="static", expected=False
+ )
assert (
result is not True
), "Testcase {} : Failed \n " "Routes:{} are still present \n Error {}".format(
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", "l1", input_dict, next_hop_lhr)
+ result = verify_rib(tgen, "ipv4", "l1", input_dict, next_hop_lhr, protocol="static")
assert result is True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
# Verify that (*,G) installed in mroute again
# Add static routes
input_dict = {
- fhr: {"static_routes": [{"network": bsr_route, "next_hop": next_hop}]},
rp: {"static_routes": [{"network": bsr_route, "next_hop": next_hop_rp}]},
lhr: {"static_routes": [{"network": bsr_route, "next_hop": next_hop_lhr}]},
}
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- for dut, _nexthop in zip([fhr, rp, lhr], [next_hop, next_hop_rp, next_hop_lhr]):
+ for dut, _nexthop in zip([rp, lhr], [next_hop_rp, next_hop_lhr]):
input_routes = {dut: input_dict[dut]}
- result = verify_rib(tgen, "ipv4", dut, input_routes, _nexthop)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_routes, _nexthop, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", fhr, input_dict, next_hop_fhr)
+ result = verify_rib(
+ tgen, "ipv4", fhr, input_dict, next_hop_fhr, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
# Verifying static routes are installed
- result = verify_rib(tgen, "ipv4", lhr, input_dict, next_hop_lhr)
+ result = verify_rib(
+ tgen, "ipv4", lhr, input_dict, next_hop_lhr, protocol="static"
+ )
assert result is True, "Testcase {} : Failed \n Error {}".format(
tc_name, result
)