"show {} route json".format(iptype),
{route: None},
)
- rv, result = topotest.run_and_expect(test_func, None, count=20, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=20, wait=1)
assertmsg = '"{}" convergence failure'.format(router)
assert result is None, assertmsg
router_list = tgen.routers()
# check for zebra capability
- for rname, router in router_list.items():
+ for _, router in router_list.items():
if router.check_capability(TopoRouter.RD_ZEBRA, "--vrfwnetns") == False:
return pytest.skip(
"Skipping BFD Topo1 VRF NETNS feature. VRF NETNS backend not available on FRR"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, 'Failed to see bgp convergence in "{}"'.format(router)
test_func = functools.partial(_bgp_aggregate_address_has_metric, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert (
result is None
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Failed bgp convergence in "{}"'.format(tgen.gears["r1"])
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_has_correct_aggregator_route_with_good_asn)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Aggregator AS attribute not found in "{}"'.format(
tgen.gears["r1"]
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, tgen.gears["r1"])
- success, result = topotest.run_and_expect(test_func, None, count=260, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=260, wait=0.5)
assert result is None, 'Failed to converge: "{}"'.format(tgen.gears["r1"])
test_func = functools.partial(_bgp_failed, tgen.gears["r3"])
- success, result = topotest.run_and_expect(test_func, None, count=260, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=260, wait=0.5)
assert result is None, 'Bad BGP Identifier notification not sent: "{}"'.format(
tgen.gears["r3"]
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
logger.info("Check if neighbor sessions are up in {}".format(router1.name))
test_func = partial(_bgp_converge, router1)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see BGP convergence in "{}"'.format(router1.name)
logger.info("BGP neighbor session is up in {}".format(router1.name))
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "More than one prefix seen at r1, SHOULD be only one."
def _bgp_has_correct_routes_without_asn_0():
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_has_correct_routes_without_asn_0)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Failed listing 192.168.100.101/32, SHOULD be accepted."
router_list = tgen.routers()
# For all registered routers, load the zebra configuration file
- for rname, router in router_list.items():
+ for _, router in router_list.items():
router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf")
router.load_config(TopoRouter.RD_OSPF, "")
router.load_config(TopoRouter.RD_BGP, "")
router_list = tgen.routers()
# For all registered routers, load the zebra configuration file
- for rname, router in router_list.items():
+ for _, router in router_list.items():
router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf")
router.load_config(TopoRouter.RD_OSPF, "")
router.load_config(TopoRouter.RD_BGP, "")
router_list = tgen.routers()
# For all registered routers, load the zebra configuration file
- for rname, router in router_list.items():
+ for _, router in router_list.items():
router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf")
router.load_config(TopoRouter.RD_OSPF, "")
router.load_config(TopoRouter.RD_BGP, "")
router_list = tgen.routers()
# For all registered routers, load the zebra configuration file
- for rname, router in router_list.items():
+ for _, router in router_list.items():
router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf")
router.load_config(TopoRouter.RD_OSPF, "")
router.load_config(TopoRouter.RD_BGP, "")
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Failed bgp convergence in "{}"'.format(tgen.gears["r2"])
step("Check if 172.16.255.254/32 is not advertised to eBGP peers")
test_func = functools.partial(_bgp_no_advertise_ebgp)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert (
result is None
step("Check if 172.16.255.254/32 is advertised to iBGP peers")
test_func = functools.partial(_bgp_no_advertise_ibgp)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert (
result is None
step("Verify if the nexthop set via route-map on r4 is marked valid")
test_func = functools.partial(_bgp_verify_nexthop_validity)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Nexthops are not valid "{}"'.format(tgen.gears["r4"])
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Cannot see BGP community aliases at r1"
def _bgp_show_prefixes_by_alias(router):
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_show_prefixes_by_alias, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Cannot see BGP prefixes by community alias at r1"
def _bgp_show_prefixes_by_large_community_list(router):
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_show_prefixes_by_large_community_list, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Cannot see BGP prefixes by large community list at r1"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
step("Check if an initial topology is converged")
test_func = functools.partial(_bgp_converge_initial)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Failed to see bgp convergence in c1"
step("Disable link between y1 and y2")
step("Check if a topology is converged after a link down between y1 and y2")
test_func = functools.partial(_bgp_converge_link_disabled)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Failed to see bgp convergence in y1"
def _bgp_check_for_duplicate_updates():
step("Check if a topology is converged after a link up between y1 and y2")
test_func = functools.partial(_bgp_converge_link_enabled)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Failed to see bgp convergence in y1"
step(
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
)
test_func = functools.partial(exist_map_routes_present, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = 'TC21: exist-map routes present in "router2" BGP table - '
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_not_present, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = 'TC22: exist-map routes not present in "router2" BGP table - '
assert result is None, msg + failed
)
test_func = functools.partial(default_route_withdrawn, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC23: advertise-map with exist-map configuration is removed from peer - "
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_not_present, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = 'TC31: non-exist-map routes not present in "router2" BGP table - '
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_present, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = 'TC32: non-exist-map routes present in "router2" BGP table - '
assert result is None, msg + failed
)
test_func = functools.partial(all_routes_advertised, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = (
"TC33: advertise-map with non-exist-map configuration is removed from a peer - "
)
test_func = functools.partial(non_exist_map_no_condition_route_map, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = 'TC41: non-exist-map route-map removed in "router2" - '
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_no_condition_route_map, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = 'TC42: exist-map route-map removed in "router2" - '
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_present_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC51: exist-map routes present with route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_present_no_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC52: exist-map routes present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_present_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC53: non-exist-map routes present, with route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_present_no_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC54: non-exist-map routes present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_not_present_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC61: exist-map routes not present, route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_not_present_no_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC62: exist-map routes not present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_not_present_rmap_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC63: non-exist-map routes not present, route-map filter - "
assert result is None, msg + failed
test_func = functools.partial(
non_exist_map_routes_not_present_no_rmap_filter, router3
)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC64: non-exist-map routes not present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_present_rmap2_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC71: exist-map routes present, route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_present_no_rmap2_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC72: exist-map routes present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_present_rmap2_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC73: non-exist-map routes present, route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(non_exist_map_routes_present_no_rmap2_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC74: non-exist-map routes present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_not_present_rmap2_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC81: exist-map routes not present, route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_not_present_no_rmap2_filter, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC82: exist-map routes not present, no route-map filter - "
assert result is None, msg + failed
test_func = functools.partial(
non_exist_map_routes_not_present_rmap2_filter, router3
)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC83: non-exist-map routes not present, route-map filter - "
assert result is None, msg + failed
test_func = functools.partial(
non_exist_map_routes_not_present_no_rmap2_filter, router3
)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC84: non-exist-map routes not present, no route-map filter - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_present_rmap2_network, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC91: exist-map routes present, route-map filter and network - "
assert result is None, msg + failed
)
test_func = functools.partial(exist_map_routes_present_rmap2_no_network, router3)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC92: exist-map routes present, route-map filter and no network - "
assert result is None, msg + failed
test_func = functools.partial(
non_exist_map_routes_not_present_rmap2_network, router3
)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC93: non-exist-map routes not present, route-map filter and network - "
assert result is None, msg + failed
test_func = functools.partial(
non_exist_map_routes_not_present_rmap2_no_network, router3
)
- success, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=90, wait=1)
msg = "TC94: non-exist-map routes not present, route-map filter and no network - "
assert result is None, msg + failed
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_check_if_received)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "No 0.0.0.0/0 at r2 from r1"
test_func = functools.partial(_bgp_check_if_originated)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "No 0.0.0.0/0 from r1 to r2"
test_func = functools.partial(_bgp_route_is_valid, tgen.gears["r2"], "0.0.0.0/0")
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "Failed to see 0.0.0.0/0 in r2"
test_func = functools.partial(_bgp_route_is_valid, tgen.gears["r2"], "0.0.0.0/1")
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "Failed to see 0.0.0.0/1 in r2"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, 'Failed to see bgp convergence in "{}"'.format(router)
test_func = functools.partial(_bgp_default_route_is_valid, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert (
result is None
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
step("Converge network")
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "Failed to see bgp convergence at r2"
step("Withdraw 10.0.0.0/22 from R2")
step("Check if we don't have 0.0.0.0/0 at R2")
test_func = functools.partial(_bgp_default_route_is_valid, router)
- success, result = topotest.run_and_expect(test_func, not None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, not None, count=30, wait=0.5)
assert result is not None, "0.0.0.0/0 exists at r2"
step("Announce 10.0.0.0/22 from R2")
step("Check if we have 0.0.0.0/0 at R2")
test_func = functools.partial(_bgp_default_route_is_valid, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "0.0.0.0/0 does not exist at r2"
step("Withdraw 10.0.0.0/22 from R2 again")
step("Check if we don't have 0.0.0.0/0 at R2 again")
test_func = functools.partial(_bgp_default_route_is_valid, router)
- success, result = topotest.run_and_expect(test_func, not None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, not None, count=30, wait=0.5)
assert result is not None, "0.0.0.0/0 exists at r2"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, 'Failed to see bgp convergence in "{}"'.format(router)
test_func = functools.partial(_bgp_default_route_has_metric, router)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert (
result is None
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(check_bgp_advertised_routes, r2)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "AddPath TX not working."
step("Check if AddPath RX is disabled on r1 and we receive only 2 paths.")
return topotest.json_cmp(output, expected)
test_func = functools.partial(check_bgp_disabled_addpath_rx, r1)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "AddPath RX advertised, but should not."
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see BGP convergence in "{}"'.format(router)
_bgp_distance_change(router)
test_func = functools.partial(_bgp_check_distance_change, router)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see applied BGP distance in RIB "{}"'.format(
router
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, r3)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Failed bgp convergence in "{}"'.format(r3)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_nh_unchanged, r2)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Wrong next-hop in "{}"'.format(r2)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
# Scenario 1.
logger.info("Scenario 1: r2 receives 192.168.255.1/32 from r1")
test_func = functools.partial(_bgp_converge, "r2")
- success, result = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
assert success is True, "Failed bgp convergence (r2)"
test_func = functools.partial(_bgp_has_routes, "r2")
- success, result = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
assert success is True, "r2 does not receive 192.168.255.1/32"
# Scenario 2.
logger.info("Scenario 2: r3 must not send 192.168.255.1/32 to r4")
test_func = functools.partial(_bgp_converge, "r4")
- success, result = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
assert success is True, "Failed bgp convergence (r4)"
test_func = functools.partial(_bgp_advertised_routes, "r3")
- success, result = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
assert success is True, "r3 announced 192.168.255.1/32 to r4"
# Scenario 3.
logger.info("Scenario 3: r6 receives 192.168.255.1/32 from r5 (iBGP)")
test_func = functools.partial(_bgp_converge, "r6")
- success, result = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
assert success is True, "Failed bgp convergence (r6)"
test_func = functools.partial(_bgp_has_routes, "r6")
- success, result = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
assert success is True, "r6 does not receive 192.168.255.1/32"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
r2.run("ip link set r2-eth3 master vrf1")
# Load FRR config and initialize all routers
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
)
tgen.gears["r{}".format(rtr)].run("sysctl -w net.mpls.conf.vrf1.input=1")
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
"192.168.2.2/32",
"0",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, prefix 192.168.2.2/32 from r2 not present"
# Check r2 gets prefix 192.168.2.1/32
"192.168.2.1/32",
"0",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, prefix 192.168.2.1/32 from r1 not present"
tgen = get_topogen()
func = functools.partial(_check_ping, "r1", "192.168.2.2", "192.168.2.1")
# tgen.mininet_cli()
- success, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
assert result is None, "r1, ping to 192.168.2.2 from 192.168.2.1 fails"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
# Check session is established
test_func = functools.partial(_bgp_converge, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "Failed bgp convergence on r2"
# Check metric has value of max-med
test_func = functools.partial(_bgp_has_routes, router2, 777)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "r2 does not receive routes with metric 777"
# Check that when the max-med timer expires, metric is updated
test_func = functools.partial(_bgp_has_routes, router2, 0)
- success, result = topotest.run_and_expect(test_func, None, count=16, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=16, wait=0.5)
assert result is None, "r2 does not receive routes with metric 0"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router1.vtysh_cmd(cmd)
test_func = functools.partial(_bgp_converge, router2, exp_prfxs)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, 'Failed bgp convergence in "{}"'.format(router2)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_neighbor_check_if_notification_sent)
- success, result = topotest.run_and_expect(test_func, None, count=40, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=40, wait=0.5)
assert result is None, "Failed to send notification message\n"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
tgen.start_router()
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
tgen.gears["r2"].cmd("ip address add dev vrf1 192.0.2.8/32")
tgen.gears["r3"].cmd("ip address add dev vrf1 192.0.2.8/32")
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_check_type1_r1, router, "3.0.0.1/32", 800001, 1)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result is None, 'Failed _check_type1_r1 in "{}"'.format(router)
test_func = functools.partial(_check_type1_r1, router, "3.0.0.2/32", 800002, 2)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result is None, 'Failed _check_type1_r1 in "{}"'.format(router)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_check_type1_peer2, "3.0.0.1/32", label=8001)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result is None, 'Failed _check_type1_peer2 in "{}"'.format("peer2")
test_func = functools.partial(_check_type1_peer2, "3.0.0.2/32", label=8002)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result is None, 'Failed _check_type1_peer2 in "{}"'.format("peer2")
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Failed bgp convergence in "{}"'.format(router)
test_func = functools.partial(
_bgp_has_aggregated_route_with_stripped_as_set, router
)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, 'Failed to see an aggregated route in "{}"'.format(router)
test_func = functools.partial(_bgp_announce_route_without_as_sets, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert (
result is None
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, f"{rname}/zebra.conf")
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
tgen.start_router()
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "BGP Converge failed"
def _bgp_extcommunity_strip(router):
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_extcommunity_strip, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Failed to strip incoming extended communities from r2"
check_r2_established = functools.partial(
check_session_established, router, neighbor_ip
)
- success, result = topotest.run_and_expect(
+ success, _ = topotest.run_and_expect(
check_r2_established, True, count=20, wait=3
)
assert success, "Session with r2 is not Established"
router = tgen.gears["r3"]
neighbor_ip = "192.168.3.1"
check_r3_mismatch = functools.partial(check_role_mismatch, router, neighbor_ip)
- success, result = topotest.run_and_expect(check_r3_mismatch, True, count=20, wait=3)
+ success, _ = topotest.run_and_expect(check_r3_mismatch, True, count=20, wait=3)
assert success, "Session between r1 and r3 was not correctly closed"
check_r4_established = functools.partial(
check_session_established, router, neighbor_ip
)
- success, result = topotest.run_and_expect(
+ success, _ = topotest.run_and_expect(
check_r4_established, True, count=20, wait=3
)
assert success, "Session with r4 is not Established"
check_r1_established = functools.partial(
check_session_established, router, neighbor_ip
)
- success, result = topotest.run_and_expect(
+ success, _ = topotest.run_and_expect(
check_r1_established, True, count=20, wait=3
)
assert success, "Session with r1 is not Established"
router = tgen.gears["r5"]
neighbor_ip = "192.168.5.1"
check_r5_mismatch = functools.partial(check_role_mismatch, router, neighbor_ip)
- success, result = topotest.run_and_expect(check_r5_mismatch, True, count=20, wait=3)
+ success, _ = topotest.run_and_expect(check_r5_mismatch, True, count=20, wait=3)
assert success, "Session between r1 and r5 was not correctly closed"
]
return output == expected
- success, result = topotest.run_and_expect(
+ success, _ = topotest.run_and_expect(
_routes_half_converged, True, count=20, wait=3
)
assert success, "Routes did not converged"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Can't match routes using ipv6 next-hop access-list"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
tgen.start_router()
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
# Check thst session is established
test_func = functools.partial(_bgp_converge, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "Failed bgp convergence on r2"
# Check that metric is 0 and weight is 100 for the received prefix
test_func = functools.partial(_bgp_has_routes, router2, 0, 100)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "r2 does not receive routes with metric 0 and weight 100"
# Update the route-map and add "on-match next" to entry 10
# Check that metric is 20 and weight is 100 for the received prefix
test_func = functools.partial(_bgp_has_routes, router2, 20, 100)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "r2 does not receive routes with metric 20 and weight 100"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
return topotest.json_cmp(output, expected)
test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see BGP convergence in "{}"'.format(router)
test_func = functools.partial(_bgp_check_local_preference, router)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see applied BGP local-preference in "{}"'.format(
router
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
router_list = tgen.routers()
- for i, (rname, router) in enumerate(tgen.routers().items(), 1):
+ for _, (rname, router) in enumerate(tgen.routers().items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
logger.info('[+] check {} "{}" {}'.format(name, cmd, expected_file))
tgen = get_topogen()
func = functools.partial(_check, name, cmd, expected_file)
- success, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
assert result is None, "Failed"
logger.info('[+] check {} "{}" {}'.format(name, cmd, expected_file))
tgen = get_topogen()
func = functools.partial(_check, name, cmd, expected_file)
- success, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
assert result is None, "Failed"
logger.info('[+] check {} "{}" {}'.format(name, cmd, expected_file))
tgen = get_topogen()
func = functools.partial(_check, name, cmd, expected_file)
- success, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
assert result is None, "Failed"
logger.info('[+] check {} "{}" {}'.format(name, cmd, expected_file))
tgen = get_topogen()
func = functools.partial(_check, name, cmd, expected_file)
- success, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
assert result is None, "Failed"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
logger.info("Check if neighbor sessions are up in {}".format(router1.name))
test_func = functools.partial(_bgp_converge, router1)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see BGP convergence in "{}"'.format(router1.name)
logger.info("BGP neighbor session is up in {}".format(router1.name))
"Check if neighbor session is up after reset in {}".format(router1.name)
)
test_func = functools.partial(_bgp_converge, router1)
- success, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=15, wait=0.5)
assert result is None, 'Failed to see BGP convergence after reset in "{}"'.format(
router1.name
)
"Verify if TCP MSS value is synced with neighbor in {}".format(router1.name)
)
test_func = functools.partial(_bgp_check_neighbor_tcp_mss, router1, "192.168.255.2")
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
result is None
), 'Failed to sync TCP MSS value over BGP session in "{}"'.format(router1.name)
"Verify if TCP MSS value is synced with neighbor in {}".format(router2.name)
)
test_func = functools.partial(_bgp_check_neighbor_tcp_mss, router2, "192.168.255.1")
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
result is None
), 'Failed to sync TCP MSS value over BGP session in "{}"'.format(router2.name)
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
tgen.start_router()
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
step("Ensure Convergence of BGP")
test_func = functools.partial(_bgp_converge)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=1)
assert result is None, 'Failed bgp convergence in "{}"'.format(tgen.gears["r2"])
step("Ensure that BGP does not crash")
test_func = functools.partial(_bgp_nexthop_cache)
- success, result = topotest.run_and_expect(test_func, True, count=10, wait=1)
+ _, result = topotest.run_and_expect(test_func, True, count=10, wait=1)
assert result is True, "BGP did not crash on r1"
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
# Check r2 initial convergence in default table
test_func = functools.partial(_bgp_converge, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert result is None, 'Failed bgp convergence in "{}"'.format(router2)
router2.vtysh_cmd("""clear ip bgp *""")
test_func = functools.partial(_bgp_check_update_delay_in_progress, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert result is None, 'Failed to set update-delay max-delay timer "{}"'.format(
router2
# Check that r2 only installs route learned from r4 after the max-delay timer expires
test_func = functools.partial(_bgp_check_route_install, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert result is None, 'Failed to install route after update-delay "{}"'.format(
router2
)
test_func = functools.partial(_bgp_check_update_delay_and_wait, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert (
result is None
router2.vtysh_cmd("""clear ip bgp *""")
test_func = functools.partial(_bgp_check_route_install, router3)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert (
result is None
router2.vtysh_cmd("""clear ip bgp *""")
test_func = functools.partial(_bgp_check_route_install, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert result is None, 'Failed to remove update-delay delay timing "{}"'.format(
router2
# Check that r2 default instance and vrf1 have the max-delay and establish set
test_func = functools.partial(_bgp_check_update_delay_and_wait, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert result is None, 'Failed to set update-delay in default instance "{}"'.format(
router2
)
test_func = functools.partial(_bgp_check_vrf_update_delay_and_wait, router2)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert result is None, 'Failed to set update-delay in vrf1 "{}"'.format(router2)
router2.vtysh_cmd("""clear ip bgp *""")
test_func = functools.partial(_bgp_check_route_install, router3)
- success, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
assert (
result is None
router_list = tgen.routers()
- for i, (rname, router) in enumerate(router_list.items(), 1):
+ for _, (rname, router) in enumerate(router_list.items(), 1):
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
)
func = functools.partial(_check, router, prefix, rd, label, nexthop)
- success, result = topotest.run_and_expect(func, None, count=20, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=20, wait=0.5)
assert_msg = "{}, show bgp ipv4 vpn {}, rd {}, label {} nexthop {}".format(
router.name, prefix, rd, label, nexthop
)
for prefix, rname_to_test in vpnv4_entries.items():
func = functools.partial(_check_nexthop_available, router, prefix)
- success, result = topotest.run_and_expect(func, None, count=20, wait=0.5)
+ _, result = topotest.run_and_expect(func, None, count=20, wait=0.5)
assert result is None, "Failed to detect prefix {} on router {}".format(
prefix, router.name
)
prefix,
"444:3",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still present".format(router.name, prefix)
# diagnostic
prefix,
"444:3",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still present".format(router.name, prefix)
logger.info(
test_func = functools.partial(
check_show_mpls_table_entry_label_not_found, router, label_ip_entries[prefix]
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry with in_label {} still present".format(
label_ip_entries[prefix]
)
prefix,
"444:3",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} not present".format(router.name, prefix)
logger.info(
prefix,
"444:3",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} not present".format(router.name, prefix)
# diagnostic
test_func = functools.partial(
check_show_mpls_table_entry_label_not_found, router, label
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry for {} with in_label {} still present".format(
prefix, label
)
"444:3",
label=label,
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, mpls vpn update {} label {} is present".format(
router.name, prefix, label
)
"444:3",
nexthop="192.168.1.3",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, mpls vpn update {} label {} is present".format(
router.name, prefix, label
)
label=label,
nexthop="192.168.1.3",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {}, label {} not present".format(
router.name, prefix, label
)
"172.31.0.0/24",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {}, is still present".format(
router.name, prefix
)
test_func = functools.partial(
check_show_mpls_table_entry_label_not_found, router, int(label)
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry for {} with in_label {} still present".format(
prefix, label
)
test_func = functools.partial(
check_show_bgp_vpn_prefix_found, router, "ipv4", prefix, "444:1"
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {}, is not present".format(router.name, prefix)
vpnv4_checks = {
prefix,
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still present".format(router.name, prefix)
prefix,
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still not present".format(router.name, prefix)
prefix,
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still present".format(router.name, prefix)
prefix,
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still not present".format(router.name, prefix)
prefix,
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still present".format(router.name, prefix)
prefix,
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, vpnv4 update {} still not present".format(router.name, prefix)
expected,
exact=True,
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, vpnv4 update 172.31.0.1 still present"
stored_label_inited = False
for prefix in group:
test_func = functools.partial(check_bgp_vpnv4_prefix_presence, router, prefix)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, prefix ipv4 vpn {} is not installed yet".format(
router.name, prefix
)
test_func = functools.partial(
check_show_mpls_table, router, blacklist, label_list, whitelist
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, MPLS labels check fail: {}".format(router.name, result)
test_func = functools.partial(
_bgp_prefix_not_found, tgen.gears["r1"], "vrf1", "ipv4", "172.31.0.11/32"
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
success
), "r1, prefix 172.31.0.11/32 from r11 did not disappear. r11 still connected to rr ?"
"172.31.0.11/32",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
success
), "r2, prefix 172.31.0.11/32 from r11 not present. r11 still disconnected from rr ?"
"172.31.0.30/32",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, vpnv4 update 172.31.0.30 not found"
bgp_vpnv4_table_check(tgen.gears["r2"], group=PREFIXES_R11 + ["172.31.0.30/32"])
"172.31.0.30/32",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, vpnv4 update 172.31.0.30 still present"
"172.31.0.50/32",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, vpnv4 update 172.31.0.50 not found"
# diagnostic
"444:1",
label=oldlabel,
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
success
), "r2, vpnv4 update 172.31.0.50 with old label {0} still present".format(oldlabel)
"172.31.0.50/32",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, vpnv4 update 172.31.0.50 not found"
label_list = set()
test_func = functools.partial(
check_show_mpls_table_entry_label_found, router, 222, "vrf1"
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry with label 222 not found"
# check label repartition is ok
test_func = functools.partial(
check_show_mpls_table_entry_label_not_found, router, 17
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry with label 17 still present"
# Check vpnv4 routes from r1
test_func = functools.partial(
check_show_mpls_table_entry_label_not_found, router, 17
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry with label 17 still present"
# Check vpnv4 routes from r1
stored_label_inited = False
for prefix in group:
test_func = functools.partial(check_bgp_vpnv6_prefix_presence, router, prefix)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, prefix ipv6 vpn {} is not installed yet".format(
router.name, prefix
)
test_func = functools.partial(
check_show_mpls_table, router, blacklist, label_list, whitelist
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "{}, MPLS labels check fail: {}".format(router.name, result)
test_func = functools.partial(
_bgp_prefix_not_found, tgen.gears["r1"], "vrf1", "ipv6", "172:31::11/128"
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
success
), "r1, prefix 172:31::11/128 from r11 did not disappear. r11 still connected to rr ?"
"172:31::11/128",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
success
), "r2, prefix 172:31::11/128 from r11 not present. r11 still disconnected from rr ?"
# Check r2 received vpnv6 update with 172:31::30
test_func = functools.partial(_prefix30_found, tgen.gears["r2"])
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, VPNv6 update 172:31::30 not found"
# that route should be sent along with label for 192::2:11
# Check r2 removed 172:31::30 vpnv6 update
test_func = functools.partial(_prefix30_not_found, tgen.gears["r2"])
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, VPNv6 update 172:31::30 still present"
"172:31::50/128",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, VPNv6 update 172:31::50 not found"
# diagnostic
"444:1",
label=oldlabel,
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert (
success
), "r2, vpnv6 update 172:31::50 with old label {0} still present".format(oldlabel)
"172:31::50/128",
"444:1",
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r2, vpnv6 update 172:31::50 not found"
label_list = set()
test_func = functools.partial(
check_show_mpls_table_entry_label_found, router, 222, "vrf1"
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry with label 222 not found"
# check label repartition is ok
test_func = functools.partial(
check_show_mpls_table_entry_label_not_found, router, 17
)
- success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
+ success, _ = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert success, "r1, mpls entry with label 17 still present"
# Check vpnv6 routes from r1