1. Improved error meesage logging.
2. No functionality changes only put some meaningfull error messages.
Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Phase 5] : R2 is about to come up now ")
result = verify_r_bit(
tgen, topo, addr_type, input_dict, dut="r2", peer="r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: R-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info("Restart BGPd on R2 ")
kill_router_daemons(tgen, "r2", ["bgpd"])
result = verify_r_bit(
tgen, topo, addr_type, input_dict, dut="r2", peer="r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: R-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Phase 5] : R2 is about to come up now ")
result = verify_r_bit(
tgen, topo, addr_type, input_dict, dut="r1", peer="r2", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: R-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
# Verifying BGP RIB routes
next_hop = next_hop_per_address_family(
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Phase 5] : R2 is about to come up now ")
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info("[Phase 4] : R1 is about to come up now ")
start_router_daemons(tgen, "r1", ["bgpd"])
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Phase 5] : R2 is about to come up now ")
result = verify_f_bit(
tgen, topo, addr_type, input_dict, dut="r1", peer="r2", expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: F-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Phase 5] : R2 is about to come up now ")
result = verify_r_bit(
tgen, topo, addr_type, input_dict, dut="r1", peer="r2", expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: R-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
# Verifying BGP RIB routes
next_hop = next_hop_per_address_family(
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "bgp"
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
dut = "r2"
peer = "r1"
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up BGP on R1 and remove Peer-level GR config from R1")
result = verify_bgp_rib(
tgen, addr_type, dut, input_topo, next_hop, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, addr_type, dut, input_topo, next_hop, protocol, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up BGP on R2 and remove Peer-level GR config from R1")
result = verify_eor(
tgen, topo, addr_type, input_dict, dut="r2", peer="r1", expected=False
)
- assert result is not True, (
- "Testcase " + tc_name + " : Failed \n Error: {}".format(result)
- )
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: EOR is set to True\n Error: {}".format(
+ tc_name, result
+ ))
logger.info(
"Waiting for selection deferral timer({} sec)..".format(GR_SELECT_DEFER_TIMER)
result = verify_eor(
tgen, topo, addr_type, input_dict, dut="r1", peer="r3", expected=False
)
- assert result is not True, (
- "Testcase " + tc_name + " : Failed \n Error: {}".format(result)
- )
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: EOR is set to True\n Error: {}".format(
+ tc_name, result
+ ))
logger.info(
"Waiting for selection deferral timer({} sec).. ".format(
result = verify_eor(
tgen, topo, addr_type, input_dict, dut="r3", peer="r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: EOR is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
dut = "r6"
input_dict_1 = {key: topo["routers"][key] for key in ["r1"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r6: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes before shutting down BGPd daemon
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r6: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying BGP RIB routes
dut = "r2"
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes before shutting down BGPd daemon
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r6: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
write_test_footer(tc_name)
# Verifying BGP RIB routes before shutting down BGPd daemon
input_dict = {key: topo["routers"][key] for key in ["r1"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes before shutting down BGPd daemon
result = verify_rib(tgen, addr_type, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Step 4] : Start BGPd daemon on R1..")
result = verify_rib(
tgen, addr_type, dut, input_dict_2, next_hop_4, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
if addr_type == "ipv6":
result = verify_rib(
tgen, addr_type, dut, input_dict_2, next_hop_6, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Step 4] : Start BGPd daemon on R1 and R4..")
result = verify_f_bit(
tgen, topo, addr_type, input_dict, "r3", "r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: F-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying BGP RIB routes after starting BGPd daemon
input_dict_1 = {key: topo["routers"][key] for key in ["r1"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
write_test_footer(tc_name)
result = verify_f_bit(
tgen, topo, addr_type, input_dict_2, "r3", "r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: F-bit is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
logger.info("[Step 3] : Kill BGPd daemon on R1..")
# Verifying BGP RIB routes
input_dict = {key: topo["routers"][key] for key in ["r1"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(tgen, addr_type, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Start BGPd daemon on R1
result = verify_eor(
tgen, topo, addr_type, input_dict_3, dut="r5", peer="r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r5: EOR is set to TRUE\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying BGP RIB routes after starting BGPd daemon
input_dict_1 = {key: topo["routers"][key] for key in ["r5"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
write_test_footer(tc_name)
result = verify_eor(
tgen, topo, addr_type, input_dict, dut="r3", peer="r1", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: EOR is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying BGP RIB routes after starting BGPd daemon
result = verify_eor(
tgen, topo, addr_type, input_dict_3, dut="r1", peer="r3", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: EOR is set to True\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
# Verifying BGP RIB routes before shutting down BGPd daemon
input_dict = {key: topo["routers"][key] for key in ["r3"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes before shutting down BGPd daemon
result = verify_rib(tgen, addr_type, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
write_test_footer(tc_name)
dut = "r1"
input_dict_1 = {key: topo["routers"][key] for key in ["r3"]}
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
result = verify_eor(
tgen, topo, addr_type, input_dict, dut="r1", peer="r2", expected=False
)
- assert result is not True, (
- "Testcase " + tc_name + " :Failed \n Error: {}".format(result)
- )
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: EOR is set to True\n Error: {}".format(
+ tc_name, result
+ ))
# Verifying BGP RIB routes received from router R1
dut = "r1"
dut = "r3"
input_dict_1 = {key: topo["routers"][key] for key in ["r1"]}
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in BGP RIB\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Verifying RIB routes before shutting down BGPd daemon
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: routes are still present in ZEBRA\n Error: {}".format(
tc_name, result
- )
+ ))
logger.info(" Expected behavior: {}".format(result))
# Start BGPd daemon on R1
result = verify_bgp_community(
tgen, adt, dut, NETWORKS[adt], input_dict_4, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "largeCommunity is still present after deleting route-map \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
dut = "r6"
for adt in ADDR_TYPES:
result = verify_bgp_community(tgen, adt, dut, NETWORKS[adt], expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Community-list is still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
result = verify_bgp_community(
tgen, adt, dut, NETWORKS[adt], input_dict_7, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "largeCommunity is still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
)
result = verify_rib(tgen, addr_type, dut, input_dict_1, tag=500, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are present with tag value 500 \n Error: {}".format(
tc_name, result
- )
+ ))
logger.info("Expected Behavior: {}".format(result))
step(
result = verify_rib(
tgen, addr_type, dut, input_dict_1, metric=123, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are present with metric value 123 \n Error: {}".format(
tc_name, result
- )
+ ))
logger.info("Expected Behavior: {}".format(result))
result = verify_rib(tgen, addr_type, dut, input_dict_2, metric=123)
result = verify_rib(
tgen, addr_type, dut, input_dict_2, metric=0, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are present with metric value 0 \n Error: {}".format(
tc_name, result
- )
+ ))
logger.info("Expected Behavior: {}".format(result))
write_test_footer(tc_name)
}
result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present in VRF RED_A and RED_B \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(tgen, addr_type, dut, input_dict_2, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present in VRF BLUE_A and BLUE_B \n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up BGPd daemon on R1.")
start_router_daemons(tgen, "r1", ["bgpd"])
#
"""
-Following tests are covered to test bgp recursive route and ebgp
+Following tests are covered to test bgp recursive route and ebgp
multi-hop functionality:
1. Verify that BGP routes are installed in iBGP peer, only when there
protocol="bgp",
expected=False,
)
- assert result is not True, "Testcase : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Reconfigure the same static route on R2 again")
dut = "r2"
result = verify_rib(
tgen, addr_type, "r2", input_dict_4, protocol="bgp", expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
next_hop=topo["routers"]["r2"]["links"]["r4"][addr_type].split("/")[0],
expected=False,
)
- assert result is not True, "Testcase : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Shut interface on R2 that has IP from the subnet as BGP next-hop")
intf_r2_r4 = topo["routers"]["r2"]["links"]["r4"]["interface"]
next_hop=topo["routers"]["r2"]["links"]["r4"][addr_type].split("/")[0],
expected=False,
)
- assert result is not True, "Testcase : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
step("Verify that once eBGP multi-hop is removed, BGP session goes down")
result = verify_bgp_convergence_from_running_config(tgen, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add ebgp-multihop command on R3 again")
for addr_type in ADDR_TYPES:
step("Verify that BGP session goes down, when update-source is removed")
result = verify_bgp_convergence_from_running_config(tgen, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add update-source command on R1 again")
for addr_type in ADDR_TYPES:
next_hop=topo["routers"]["r1"]["links"]["r3"][addr_type].split("/")[0],
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
sleep(3)
step("Verify that BGP session goes down, when static route is removed")
result = verify_bgp_convergence_from_running_config(tgen, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add static route on R3 again")
for addr_type in ADDR_TYPES:
sleep(3)
step("Verify that BGP neighborship between R1 and R3 goes down")
result = verify_bgp_convergence_from_running_config(tgen, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
intf_r1_r3 = topo["routers"]["r1"]["links"]["r3"]["interface"]
shutdown_bringup_interface(tgen, "r1", intf_r1_r3, True)
],
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Reconfigure multipath-relax command on R4")
result = create_router_bgp(tgen, topo, maxpath_relax)
],
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Re-configure maximum-path 2 command on R4")
input_dict_8 = {
"configured but not peer routers"
)
result = verify_bgp_convergence(tgen, topo, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
step("configure same password on R2 and R3")
for routerN in ["r2", "r3"]:
"strings are in CAPs on R2 and R3"
)
result = verify_bgp_convergence(tgen, topo, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
step("Configure same password on R2 and R3 without CAPs")
for routerN in ["r2", "r3"]:
step("Verify if password is removed from R1, both sessions go down again")
result = verify_bgp_convergence(tgen, topo, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error : {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BGP is converged \n Error: {}".format(
tc_name, result
- )
+ ))
step("Configure alphanumeric password on R1 and peer routers R2,R3")
for bgp_neighbor in ["r2", "r3"]:
)
for addr_type in ADDR_TYPES:
input_routes = {key: topo["routers"][key] for key in ["r1"]}
- result = verify_rib(tgen, addr_type, "d2", input_routes, expected=True)
+ result = verify_rib(tgen, addr_type, "d2", input_routes)
assert result is True, "Testcase {} :Failed \n Error: {}".format(
tc_name, result
)
for addr_type in ADDR_TYPES:
input_routes = {key: topo["routers"][key] for key in ["r2"]}
- result = verify_rib(tgen, addr_type, "d2", input_routes, expected=True)
+ result = verify_rib(tgen, addr_type, "d2", input_routes)
assert result is True, "Testcase {} :Failed \n Error: {}".format(
tc_name, result
)
step("Verify if b1 chosen as BSR in l1")
result = verify_pim_bsr(tgen, topo, "l1", BSR_IP_1, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "b1 is not chosen as BSR in l1 \n Error: {}".format(
+ tc_name, result
+ ))
state_after = verify_pim_interface_traffic(tgen, state_dict)
assert isinstance(
# Verify bsr state in l1
step("Verify no BSR in l1 as i1 would not forward the no-forward bsm")
result = verify_pim_bsr(tgen, topo, "l1", bsr_ip, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "BSR data is present after no-forward bsm also \n Error: {}".format(
+ tc_name, result
+ ))
# unconfigure unicast bsm on f1-i1-eth2
step("unconfigure unicast bsm on f1-i1-eth2, will forward with only mcast")
result = verify_ip_mroutes(
tgen, "i1", src_addr, GROUP_ADDRESS, iif, oil, expected=False
)
- assert result is not True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Mroutes are still present \n Error: {}".format(
+ tc_name, result
+ ))
# unconfigure bsm processing on f1 on f1-i1-eth2
step("unconfigure bsm processing on f1 in f1-i1-eth2, will drop bsm")
# Verify bsr state in i1
step("Verify if b1 is not chosen as BSR in i1")
result = verify_pim_bsr(tgen, topo, "i1", bsr_ip, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "b1 is chosen as BSR in i1 \n Error: {}".format(
+ tc_name, result
+ ))
# check if mroute still not installed because of rp not available
step("check if mroute still not installed because of rp not available")
result = verify_ip_mroutes(
tgen, "i1", src_addr, GROUP_ADDRESS, iif, oil, expected=False
)
- assert result is not True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroute installed but rp not available \n Error: {}".format(
+ tc_name, result
+ ))
# configure bsm processing on i1 on f1-i1-eth2
step("configure bsm processing on f1 in f1-i1-eth2, will accept bsm")
tgen, topo, "f1", group, rp_source="BSR", expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "bsr has not aged out in f1 \n Error: {}".format(
+ tc_name, result
+ ))
# Verify RP mapping removed after hold timer expires
group = "225.1.1.1/32"
result = verify_join_state_and_timer(
tgen, dut, iif, src_addr, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "join state is up and join timer is running in l1 \n Error: {}".format(
+ tc_name, result
+ ))
# Verify ip mroute is not installed
step("Verify mroute not installed in l1")
result = verify_ip_mroutes(
tgen, dut, src_addr, GROUP_ADDRESS, iif, oil, expected=False
)
- assert result is not True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroute installed in l1 \n Error: {}".format(
+ tc_name, result
+ ))
step("clear BSM database before moving to next case")
clear_bsrp_data(tgen, topo)
result = verify_ip_mroutes(
tgen, dut, src_addr, GROUP_ADDRESS, iif, oil, expected=False
)
- assert result is not True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroute installed in l1 \n Error: {}".format(
+ tc_name, result
+ ))
# Add back route for RP to make it reachable
step("Add back route for RP to make it reachable")
result = verify_ip_mroutes(
tgen, dut, src_addr, GROUP_ADDRESS, iif, oil, wait=20, expected=False
)
- assert result is not True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroute installed in l1 \n Error: {}".format(
+ tc_name, result
+ ))
# Send BSM again to configure rp
step("Add back RP by sending BSM from b1")
# Verify bsr state in FHR
step("Verify if b2 is not chosen as bsr in f1")
result = verify_pim_bsr(tgen, topo, "f1", bsr_ip2, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "b2 is chosen as bsr in f1 \n Error: {}".format(
+ tc_name, result
+ ))
# Verify if b1 is still chosen as bsr
step("Verify if b1 is still chosen as bsr in f1")
IGMP_JOIN_RANGE_1,
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "upstream is still present after shut the link from "
+ "FHR to RP from RP node \n Error: {}".format(
tc_name, result
- )
+ ))
step(" No shut the link from FHR to RP from RP node")
IGMP_JOIN_RANGE_1,
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "upstream is still present after shut the link from "
+ "FHR to RP from FHR node \n Error: {}".format(
tc_name, result
- )
+ ))
step(" No shut the link from FHR to RP from FHR node")
data["oil"],
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroutes(S,G) are present after delete of static routes on c1 \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_upstream_iif(
tgen,
IGMP_JOIN_RANGE_1,
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "upstream is present after delete of static routes on c1 \n Error: {}".format(
tc_name, result
- )
+ ))
for data in input_dict_starg:
result = verify_ip_mroutes(
data["oil"],
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroutes(*,G) are present after delete of static routes on c1 \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_upstream_iif(
tgen,
IGMP_JOIN_RANGE_1,
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "upstream is present after delete of static routes on c1 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Configure default routes on c2")
result = verify_pim_rp_info(
tgen, topo, dut, GROUP_RANGE_1, "Unknown", rp_address, SOURCE, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "RP info is unknown after removing static route from c2 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Verify (s,g) populated after adding default route ")
data["oil"],
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "mroutes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_upstream_iif(
tgen,
IGMP_JOIN_RANGE_1,
expected=False,
)
- assert result is not True, "Testcase {} : Failed Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "upstream is still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Configure default routes on all the nodes")
result = verify_pim_rp_info(
tgen, topo, dut, GROUP_RANGE_1, "Unknown", rp_address, SOURCE, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "RP info is unknown after removing static route from c2 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Verify (s,g) populated after adding default route ")
dut = "r1"
interface = "r1-r0-eth0"
result = verify_igmp_groups(tgen, dut, interface, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: igmp group present without any IGMP join \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify show ip pim interface traffic without any IGMP join")
state_dict = {"r1": {"r1-r2-eth1": ["pruneTx"]}}
result = verify_pim_rp_info(
tgen, topo, dut, GROUP_RANGE_ALL, iif, rp_address, SOURCE, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: RP info present \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify upstream IIF interface")
result = verify_upstream_iif(tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream IIF interface present \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify upstream join state and join timer")
result = verify_join_state_and_timer(
tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream join state is up and join timer is running \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify PIM state")
result = verify_pim_state(tgen, dut, iif, oif, GROUP_ADDRESS, expected=False)
step("r1: Verify ip mroutes")
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: mroutes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify show ip pim interface traffic without any IGMP join")
state_after = verify_pim_interface_traffic(tgen, state_dict)
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S, G) upstream join state is up and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r2-eth1"
"using show ip pim state"
)
result = verify_pim_state(tgen, dut, iif, oif, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "OIL is not same and IIF is not cleared on R1 \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: upstream IIF should be unknown , verify using show ip pim" "upstream")
result = verify_upstream_iif(tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream IIF is not unknown \n Error: {}".format(
tc_name, result
- )
+ ))
step(
"r1: join state should not be joined and join timer should stop,"
result = verify_join_state_and_timer(
tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: join state is joined and timer is not stopped \n Error: {}".format(
tc_name, result
- )
+ ))
step(
"r1: (*,G) prune is sent towards the RP interface, verify using"
step("r1: (*, G) cleared from mroute table using show ip mroute")
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: (*, G) are not cleared from mroute table \n Error: {}".format(
tc_name, result
- )
+ ))
logger.info("Expected behavior: {}".format(result))
# Uncomment next line for debugging
result = verify_pim_rp_info(
tgen, topo, dut, GROUP_RANGE_ALL, iif, rp_address, SOURCE, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: rp-info is present \n Error: {}".format(
tc_name, result
- )
+ ))
step("joinTx value before join sent")
state_dict = {"r1": {"r1-r2-eth1": ["joinTx"]}}
step("r1: Verify upstream IIF interface")
result = verify_upstream_iif(tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream IFF interface is present \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify upstream join state and join timer")
result = verify_join_state_and_timer(
tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream join state is joined and timer is running \n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify PIM state")
result = verify_pim_state(tgen, dut, iif, oif, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: PIM state is up\n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Verify ip mroutes")
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: mroutes are still present\n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Configure static RP")
input_dict = {
step("r1 : Verify upstream IIF interface")
iif = "r1-r2-eth1"
result = verify_upstream_iif(tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream IIF interface is present\n Error: {}".format(
tc_name, result
- )
+ ))
step("r1 : Verify upstream join state and join timer")
result = verify_join_state_and_timer(
tgen, dut, iif, STAR, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: upstream join state is joined and timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r1 : Verify PIM state")
result = verify_pim_state(tgen, dut, iif, oif, GROUP_ADDRESS, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: PIM state is up\n Error: {}".format(
tc_name, result
- )
+ ))
step("r1 : Verify ip mroutes")
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: mroutes are still present\n Error: {}".format(
tc_name, result
- )
+ ))
step("r1: Make RP reachable")
intf = "r1-r2-eth1"
result = verify_pim_rp_info(
tgen, topo, dut, GROUP_RANGE, oif, rp_address_2, SOURCE, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: rp-info is present for group 225.1.1.1 \n Error: {}".format(
tc_name, result
- )
+ ))
step(
"r1 : Verify RPF interface updated in mroute when higher preferred"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S, G) upstream join state is joined and join"
+ " timer is running \n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_1, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_1, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_2, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r4: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r4: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_1, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_1, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_2, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r4: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r4: Verify (S, G) ip mroutes")
oif = "none"
result = verify_join_state_and_timer(
tgen, dut, iif, SOURCE_ADDRESS, GROUP_ADDRESS_LIST_2, expected=False
)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (S, G) ip mroutes")
oif = "r3-r1-eth0"
iif = "r1-r3-eth2"
oif = "r1-r0-eth0"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: (*,G) mroutes are not cleared after shut of R1 to R3 link\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (*, G) ip mroutes")
dut = "r2"
iif = "lo"
oif = "r2-r3-eth1"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (*,G) mroutes are not cleared after shut of R1 to R3 link\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: Verify (*, G) ip mroutes")
dut = "r3"
iif = "r3-r2-eth1"
oif = "r3-r1-eth0"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r3: (*,G) mroutes are not cleared after shut of R1 to R3 link\n Error: {}".format(
tc_name, result
- )
+ ))
step("r3: No shutdown the link from R1 to R3 from R3 node")
dut = "r3"
iif = "r1-r2-eth1"
oif = "r1-r0-eth0"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: (*,G) mroutes are not cleared after shut of R1 to R0 link\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (*, G) ip mroutes cleared")
dut = "r2"
iif = "lo"
oif = "r2-r1-eth0"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (*,G) mroutes are not cleared after shut of R1 to R0 link\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
iif = "r1-r2-eth1"
oif = "r1-r0-eth0"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: (*,G) mroutes are not cleared after shut of R1 to R2 and R3 link\n Error: {}".format(
tc_name, result
- )
+ ))
step("r2: Verify (*, G) ip mroutes cleared")
dut = "r2"
iif = "lo"
oif = "r2-r1-eth0"
result = verify_ip_mroutes(tgen, dut, STAR, GROUP_ADDRESS, iif, oif, expected=False)
- assert result is not True, "Testcase {} :Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r2: (*,G) mroutes are not cleared after shut of R1 to R2 and R3 link\n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
- result = verify_rib(
- tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
- )
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+ expected=False)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up OSPFd daemon on R0.")
start_router_daemons(tgen, "r0", ["ospfd"])
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
- result = verify_rib(
- tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
- )
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+ expected=False)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up staticd daemon on R0.")
start_router_daemons(tgen, "r0", ["staticd"])
shutdown_bringup_interface(tgen, dut, intf, False)
result = verify_ospf_rib(tgen, dut, input_dict, next_hop=nh, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, next_hop=nh, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
for intfr in range(1, 7):
intf = topo["routers"]["r1"]["links"]["r0-link{}".format(intfr)]["interface"]
result = verify_ospf_rib(
tgen, dut, input_dict, next_hop=nh, attempts=5, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
attempts=5,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Re configure the static route in R0.")
dut = "r0"
result = verify_ospf_rib(
tgen, dut, input_dict, next_hop=nh, attempts=5, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
attempts=5,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Reconfigure the static route in R0.Change ECMP value to 2.")
dut = "r0"
result = verify_ospf_rib(
tgen, dut, input_dict, next_hop=nh, attempts=5, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
attempts=5,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
shutdown_bringup_interface(tgen, dut, intf, False)
result = verify_ospf_neighbor(tgen, topo, dut, lan=True, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r0: OSPF neighbors-hip is up \n Error: {}".format(
tc_name, result
- )
+ ))
step("No Shut interface on R0")
dut = "r0"
}
}
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are present in fib \n Error: {}".format(
tc_name, result
- )
+ ))
step("Delete and reconfigure prefix list.")
# Create ip prefix list
}
}
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
pfx_list = {
"r0": {
}
}
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, attempts=2, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, attempts=2, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step(
"configure the route map with the same name that is used "
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
# Create route map
routemaps = {"r0": {"route_maps": {"rmap_ipv4": [{"action": "deny"}]}}}
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Delete the route map.")
# Create route map
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present \n Error: {}".format(
tc_name, result
- )
+ ))
result = verify_rib(
tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
write_test_footer(tc_name)
if result is not True:
break
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present after deleting ip address of newly "
+ "configured interface of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
attempts=5,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present in fib after deleting ip address of newly "
+ "configured interface of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add back the deleted ip address on newly configured interface of R0")
topo1 = {
result = verify_ospf_rib(tgen, dut, input_dict, next_hop=nh, expected=False)
if result is not True:
break
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present after deleting ip address of newly "
+ "configured loopback of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
next_hop=nh,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present in fib after deleting ip address of newly "
+ "configured loopback of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add back the deleted ip address on newly configured interface of R0")
topo1 = {
result4 = verify_rib(
tgen, addr_type, dut, input_dict, protocol=protocol, expected=False
)
- assert result4 is not True, "Testcase {} : Failed \n" "Error: {}".format(
+ assert result4 is not True, ("Testcase {} : Failed \n"
+ "routes are still present \n Error: {}".format(
tc_name, result4
- )
+ ))
step("vm4 should be present in FRR1")
dut = "r1"
result4 = verify_rib(
tgen, addr_type, dut, input_dict, protocol=protocol, expected=False
)
- assert result4 is not True, "Testcase {} : Failed \n" "Error: {}".format(
+ assert result4 is not True, ("Testcase {} : Failed \n"
+ "routes are still present \n Error: {}".format(
tc_name, result4
- )
+ ))
step("vm4 should be present in FRR1")
dut = "r1"