]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: supress unused variables at topotests
authorY Bharath <y.bharath@samsung.com>
Wed, 12 Jun 2024 08:26:34 +0000 (13:56 +0530)
committerY Bharath <y.bharath@samsung.com>
Wed, 12 Jun 2024 08:26:34 +0000 (13:56 +0530)
For code maintainability, suppressed unused variables with "_"

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
98 files changed:
tests/topotests/bfd_topo3/test_bfd_topo3.py
tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py
tests/topotests/bgp_accept_own/test_bgp_accept_own.py
tests/topotests/bgp_addpath_best_selected/test_bgp_addpath_best_selected.py
tests/topotests/bgp_aggregate_address_matching_med/test_bgp_aggregate_address_matching_med.py
tests/topotests/bgp_aggregate_address_origin/test_bgp_aggregate-address_origin.py
tests/topotests/bgp_aggregate_address_route_map/test_bgp_aggregate-address_route-map.py
tests/topotests/bgp_aggregator_zero/test_bgp_aggregator_zero.py
tests/topotests/bgp_aigp/test_bgp_aigp.py
tests/topotests/bgp_as_override/test_bgp_as_override.py
tests/topotests/bgp_as_wide_bgp_identifier/test_bgp_as_wide_bgp_identifier.py
tests/topotests/bgp_asdot_regex/test_bgp_asdot_regex.py
tests/topotests/bgp_aspath_zero/test_bgp_aspath_zero.py
tests/topotests/bgp_auth/test_bgp_auth1.py
tests/topotests/bgp_auth/test_bgp_auth2.py
tests/topotests/bgp_auth/test_bgp_auth3.py
tests/topotests/bgp_auth/test_bgp_auth4.py
tests/topotests/bgp_bfd_down_cease_notification/test_bgp_bfd_down_cease_notification.py
tests/topotests/bgp_blackhole_community/test_bgp_blackhole_community.py
tests/topotests/bgp_comm_list_delete/test_bgp_comm-list_delete.py
tests/topotests/bgp_comm_list_match/test_bgp_comm_list_match.py
tests/topotests/bgp_community_alias/test_bgp-community-alias.py
tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py
tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py
tests/topotests/bgp_conditional_advertisement_track_peer/test_bgp_conditional_advertisement_track_peer.py
tests/topotests/bgp_confederation_astype/test_bgp_confederation_astype.py
tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py
tests/topotests/bgp_default_originate_timer/test_bgp_default_originate_timer.py
tests/topotests/bgp_default_originate_withdraw/test_bgp_default_originate_withdraw.py
tests/topotests/bgp_default_route/test_bgp_default-originate.py
tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py
tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py
tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py
tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py
tests/topotests/bgp_disable_addpath_rx/test_disable_addpath_rx.py
tests/topotests/bgp_distance_change/test_bgp_distance_change.py
tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py
tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py
tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py
tests/topotests/bgp_extcomm_list_delete/test_bgp_extcomm-list_delete.py
tests/topotests/bgp_extended_optional_parameters_length/test_bgp_extended_optional_parameters_length.py
tests/topotests/bgp_gr_notification/test_bgp_gr_notification.py
tests/topotests/bgp_gshut/test_bgp_gshut.py
tests/topotests/bgp_ipv4_class_e_peer/test_bgp_ipv4_class_e_peer.py
tests/topotests/bgp_ipv6_ll_peering/test_bgp_ipv6_ll_peering.py
tests/topotests/bgp_l3vpn_label_export/test_bgp_l3vpn_label_export.py
tests/topotests/bgp_labeled_unicast_addpath/test_bgp_labeled_unicast_addpath.py
tests/topotests/bgp_labeled_unicast_default_originate/test_bgp_labeled_unicast_default_originate.py
tests/topotests/bgp_large_comm_list_match/test_bgp_large_comm_list_match.py
tests/topotests/bgp_llgr/test_bgp_llgr.py
tests/topotests/bgp_local_as/test_bgp_local_as.py
tests/topotests/bgp_local_as_dotplus_private_remove/test_bgp_local_as_dotplus_private_remove.py
tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py
tests/topotests/bgp_lu_explicitnull/test_bgp_lu_explicitnull.py
tests/topotests/bgp_max_med_on_startup/test_bgp_max_med_on_startup.py
tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py
tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py
tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py
tests/topotests/bgp_node_target_extcommunities/test_bgp_node_target_extcommunities.py
tests/topotests/bgp_orf/test_bgp_orf.py
tests/topotests/bgp_path_selection/test_bgp_path_selection.py
tests/topotests/bgp_peer_graceful_shutdown/test_bgp_peer_graceful_shutdown.py
tests/topotests/bgp_peer_group/test_bgp_peer-group.py
tests/topotests/bgp_prefix_list_any/test_bgp_prefix_list_any.py
tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py
tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py
tests/topotests/bgp_remove_private_as/test_bgp_remove_private_as.py
tests/topotests/bgp_remove_private_as_route_map/test_bgp_remove_private_as_route_map.py
tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py
tests/topotests/bgp_roles_capability/test_bgp_roles_capability.py
tests/topotests/bgp_roles_filtering/test_bgp_roles_filtering.py
tests/topotests/bgp_route_map_delay_timer/test_bgp_route_map_delay_timer.py
tests/topotests/bgp_route_map_match_ipv6_nexthop/test_bgp_route_map_match_ipv6_nexthop.py
tests/topotests/bgp_route_map_match_source_protocol/test_bgp_route_map_match_source_protocol.py
tests/topotests/bgp_route_map_on_match_next/test_bgp_route_map_on_match_next.py
tests/topotests/bgp_route_map_vpn_import/test_bgp_route_map_vpn_import.py
tests/topotests/bgp_route_server_client/test_bgp_route_server_client.py
tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py
tests/topotests/bgp_sender_as_path_loop_detection/test_bgp_sender-as-path-loop-detection.py
tests/topotests/bgp_set_aspath_exclude/test_bgp_set_aspath_exclude.py
tests/topotests/bgp_set_aspath_replace/test_bgp_set_aspath_replace.py
tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py
tests/topotests/bgp_software_version/test_bgp_software_version.py
tests/topotests/bgp_soo/test_bgp_soo.py
tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py
tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py
tests/topotests/bgp_tcp_mss_passive/test_bgp_tcp_mss_passive.py
tests/topotests/bgp_unnumbered/test_bgp_unnumbered.py
tests/topotests/bgp_update_delay/test_bgp_update_delay.py
tests/topotests/bgp_vpn_5549_route_map/test_bgp_vpn_5549_route_map.py
tests/topotests/bgp_vpnv4_asbr/test_bgp_vpnv4_asbr.py
tests/topotests/bgp_vpnv4_ebgp/test_bgp_vpnv4_ebgp.py
tests/topotests/bgp_vpnv4_per_nexthop_label/test_bgp_vpnv4_per_nexthop_label.py
tests/topotests/bgp_vpnv6_per_nexthop_label/test_bgp_vpnv6_per_nexthop_label.py

index d7b2542f9ffd66afb4d66124ef5dd40285a94608..a899a2b464d2345bedb48e4d75f5c6a9cbac4241 100644 (file)
@@ -95,7 +95,7 @@ def expect_route_missing(router, iptype, route):
         "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
 
index 9e5a68f0a3138f1abc702dba174be08de7669591..f6adff61d0ede2a7fe657fdc7efdffc9a05c1c6e 100644 (file)
@@ -61,7 +61,7 @@ def setup_module(mod):
     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"
index d294da0934b9518e07019ff210814d16d482ff8a..11b24baa826c41d4fc3f1ee5407c87053741e3da 100644 (file)
@@ -68,7 +68,7 @@ def setup_module(mod):
 
     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))
         )
index 2a610c901ec32f65d911fe3ff3a07920efc40394..3d17a2b709771ea8341a63f680c914b9147ef9d5 100644 (file)
@@ -51,7 +51,7 @@ def setup_module(mod):
 
     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))
         )
index 5a4a5fb657cf6be9288691619d9a256b1cb94bd1..0520b5e1369d9e8c38ecc77305486213abd3c89a 100644 (file)
@@ -49,7 +49,7 @@ def setup_module(mod):
 
     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))
         )
index 739685d417648db405f93c6e274a68b2af62cb8a..188bbd0b98afdd1572f1c526e84abd3496940782 100644 (file)
@@ -49,7 +49,7 @@ def setup_module(mod):
 
     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))
         )
@@ -89,12 +89,12 @@ def test_bgp_aggregate_address_origin():
         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
index eeac7146b1fa49106596814804443ceee2430746..2343440aaf25aee98de9846239afc69698ff1bc1 100644 (file)
@@ -52,7 +52,7 @@ def setup_module(mod):
 
     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))
         )
index d9ef3e1ce151d78fec658734408facc7cec5fca2..1a52f8c90ee6d9d1e6753bdd03fecc2e32ddb19e 100644 (file)
@@ -73,7 +73,7 @@ def test_bgp_aggregator_zero():
         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"])
 
@@ -99,7 +99,7 @@ def test_bgp_aggregator_zero():
         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"]
index 655e9ad1848508af0f97581f48539c2b3753bb98..e3b32da164766db5a4091c0d2ce9d44a98144b99 100644 (file)
@@ -73,7 +73,7 @@ def setup_module(mod):
 
     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))
         )
index 7cb4f81cfc18c12797447ab78d60507e051ab77a..dbbdf2c88f8eac8d9da32a907ae77da20bcac5e9 100644 (file)
@@ -49,7 +49,7 @@ def setup_module(mod):
 
     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))
         )
index 5c09a6b0e0b9ccef06693081f5e061c8cd052fee..e8e3b4171a665a70212c4021787d9e28f473463f 100644 (file)
@@ -48,7 +48,7 @@ def setup_module(mod):
 
     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))
         )
@@ -85,12 +85,12 @@ def test_bgp_as_wide_bgp_identifier():
         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"]
index 4883e847c9c7efed72260d8eb5be63a45aefde96..09803dfa842b4fb25568b0bd16f4d107bb1fceea 100644 (file)
@@ -60,7 +60,7 @@ def setup_module(mod):
 
     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))
         )
@@ -97,7 +97,7 @@ def test_bgp_asdot_regex():
 
     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))
index 0f1a08308fd0592b2e08acd267629935e95957c9..fe89a87621cab5aa45687aa788581ff570056a5e 100644 (file)
@@ -73,7 +73,7 @@ def test_bgp_aggregator_zero():
         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():
@@ -82,7 +82,7 @@ def test_bgp_aggregator_zero():
         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."
 
 
index 9d47106c072fe1a68a2576caa80ec13c5d9c9982..c19a740a92b735a35478e3ecd7e9e34d5ad73d36 100644 (file)
@@ -156,7 +156,7 @@ def setup_module(mod):
     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, "")
index 6b920367270f4a45d10a47e7902cbca58a3f899e..2551c1c35b7f6dd1e970b6b40f3934cf5862f9ae 100644 (file)
@@ -156,7 +156,7 @@ def setup_module(mod):
     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, "")
index 2237c6b1b6dc65614c0f4fd880fa8da136fd11d0..dc4f61d3c99d04202b5016a36cf5fb3880841506 100644 (file)
@@ -155,7 +155,7 @@ def setup_module(mod):
     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, "")
index d6fe42504bc28dc40d0de4df81bd7cfc842f32fb..afe4441e13ed7c4aef2ac87f8da6ea91b8751611 100644 (file)
@@ -155,7 +155,7 @@ def setup_module(mod):
     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, "")
index 00142981c502e1b31543e7a79e52cd47571d15b4..8536b3506f5349f3102fba0334408789d3287ff5 100644 (file)
@@ -45,7 +45,7 @@ def setup_module(mod):
 
     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))
         )
index 9f5c0ef924bd433b1d258ea82459257cef7275a8..05a9a1e7f61695b909f979001bf5a07bde1056d9 100644 (file)
@@ -51,7 +51,7 @@ def setup_module(mod):
 
     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))
         )
@@ -125,14 +125,14 @@ def test_bgp_blackhole_community():
         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
@@ -142,7 +142,7 @@ def test_bgp_blackhole_community():
 
     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
@@ -152,7 +152,7 @@ def test_bgp_blackhole_community():
 
     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"])
 
 
index efc8f200a35ea0be3d4af9ccdb22266a840f5aaf..2064dac6e65b35479b7b0aeb65aa4482d1d6ca63 100644 (file)
@@ -48,7 +48,7 @@ def setup_module(mod):
 
     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))
         )
index de69ea9387eddc4577b4eab21d15961f1f97f961..d0cab26e1afe96a46354e58887560f3ce77a39ae 100644 (file)
@@ -56,7 +56,7 @@ def setup_module(mod):
 
     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))
         )
index fdae9a3aa748b559ccdb51eb659c954c2cc5803d..9df73a51ba8af4528d3c4b3b28a829d3e6830f39 100644 (file)
@@ -40,7 +40,7 @@ def setup_module(mod):
 
     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))
         )
@@ -92,7 +92,7 @@ def test_bgp_community_alias():
         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):
@@ -118,7 +118,7 @@ def test_bgp_community_alias():
         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):
@@ -129,7 +129,7 @@ def test_bgp_community_alias():
         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"
 
 
index 5ad15e064589f035dc2dfbac6abb86bd31ac6465..c0a92efba9a7584535f57fa4c3dccc18c2de956e 100644 (file)
@@ -97,7 +97,7 @@ def setup_module(mod):
 
     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))
         )
@@ -133,7 +133,7 @@ def test_bgp_community_update_path_change():
 
     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")
@@ -146,7 +146,7 @@ def test_bgp_community_update_path_change():
 
     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():
@@ -193,7 +193,7 @@ def test_bgp_community_update_path_change():
 
     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(
index 0128c883491699c560de3f78e49919edc60f0602..577bf9fd76028636cead458ca78f2b8362f5196f 100644 (file)
@@ -159,7 +159,7 @@ def setup_module(mod):
 
     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))
         )
@@ -426,7 +426,7 @@ def test_bgp_conditional_advertisement_tc_2_1():
     )
 
     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
@@ -455,7 +455,7 @@ def test_bgp_conditional_advertisement_tc_2_2():
     )
 
     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
@@ -484,7 +484,7 @@ def test_bgp_conditional_advertisement_tc_2_3():
     )
 
     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
@@ -513,7 +513,7 @@ def test_bgp_conditional_advertisement_tc_3_1():
     )
 
     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
@@ -542,7 +542,7 @@ def test_bgp_conditional_advertisement_tc_3_2():
     )
 
     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
@@ -571,7 +571,7 @@ def test_bgp_conditional_advertisement_tc_3_3():
     )
 
     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 - "
@@ -603,7 +603,7 @@ def test_bgp_conditional_advertisement_tc_4_1():
     )
 
     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
@@ -632,7 +632,7 @@ def test_bgp_conditional_advertisement_tc_4_2():
     )
 
     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
@@ -665,7 +665,7 @@ def test_bgp_conditional_advertisement_tc_5_1():
     )
 
     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
@@ -694,7 +694,7 @@ def test_bgp_conditional_advertisement_tc_5_2():
     )
 
     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
@@ -724,7 +724,7 @@ def test_bgp_conditional_advertisement_tc_5_3():
     )
 
     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
@@ -753,7 +753,7 @@ def test_bgp_conditional_advertisement_tc_5_4():
     )
 
     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
@@ -791,7 +791,7 @@ def test_bgp_conditional_advertisement_tc_6_1():
     )
 
     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
@@ -820,7 +820,7 @@ def test_bgp_conditional_advertisement_tc_6_2():
     )
 
     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
@@ -850,7 +850,7 @@ def test_bgp_conditional_advertisement_tc_6_3():
     )
 
     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
@@ -881,7 +881,7 @@ def test_bgp_conditional_advertisement_tc_6_4():
     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
@@ -919,7 +919,7 @@ def test_bgp_conditional_advertisement_tc_7_1():
     )
 
     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
@@ -948,7 +948,7 @@ def test_bgp_conditional_advertisement_tc_7_2():
     )
 
     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
@@ -978,7 +978,7 @@ def test_bgp_conditional_advertisement_tc_7_3():
     )
 
     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
@@ -1007,7 +1007,7 @@ def test_bgp_conditional_advertisement_tc_7_4():
     )
 
     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
@@ -1045,7 +1045,7 @@ def test_bgp_conditional_advertisement_tc_8_1():
     )
 
     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
@@ -1074,7 +1074,7 @@ def test_bgp_conditional_advertisement_tc_8_2():
     )
 
     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
@@ -1106,7 +1106,7 @@ def test_bgp_conditional_advertisement_tc_8_3():
     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
@@ -1137,7 +1137,7 @@ def test_bgp_conditional_advertisement_tc_8_4():
     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
@@ -1175,7 +1175,7 @@ def test_bgp_conditional_advertisement_tc_9_1():
     )
 
     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
@@ -1204,7 +1204,7 @@ def test_bgp_conditional_advertisement_tc_9_2():
     )
 
     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
@@ -1244,7 +1244,7 @@ def test_bgp_conditional_advertisement_tc_9_3():
     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
@@ -1275,7 +1275,7 @@ def test_bgp_conditional_advertisement_tc_9_4():
     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
index e76307291e4adc0363941f9ceacd796352b47e30..bb98e2fad01786f6348b8b149ec819c094223501 100644 (file)
@@ -51,7 +51,7 @@ def setup_module(mod):
 
     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))
         )
index 7bc005010943c8a284eb35585aa858f873c02538..44b1a2f7041ffbba30b2ae3c5c4c2ba14a8d78bc 100644 (file)
@@ -35,7 +35,7 @@ def setup_module(mod):
 
     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))
         )
index 05e07486aeb83c05fb158a5ce9a0ea3936c82583..48dddb464895576fa1774356adb561f474a4510f 100644 (file)
@@ -48,7 +48,7 @@ def setup_module(mod):
 
     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))
         )
index b2ba936fb1f6148b7444095a394707154ef882f3..c7c40c1bfbbd7e26d92c282a3ebc059f3d05777b 100644 (file)
@@ -50,7 +50,7 @@ def setup_module(mod):
 
     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))
         )
index e25f85af8501fb61a1e00a920495d0d0ef875536..cd4acc9aa42f58eaa41fe06a4fb872ee78d9bb2b 100644 (file)
@@ -49,7 +49,7 @@ def setup_module(mod):
 
     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))
         )
index 333beb067ce133a1898752f010cfad577aefba65..e805d06a6ac60f9d114ca96b1694a366ff82002c 100644 (file)
@@ -40,7 +40,7 @@ def setup_module(mod):
 
     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))
         )
@@ -85,19 +85,19 @@ def test_bgp_default_originate_route_map():
         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"
 
 
index 9dcb5a1eef320c6c8b3a222686c7f9e8365b5588..d866b95f7b6f1090c0e1f27a596c9459e43512be 100644 (file)
@@ -40,7 +40,7 @@ def setup_module(mod):
 
     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))
         )
@@ -80,12 +80,12 @@ def test_bgp_default_originate_route_map():
         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
index 965d348bd70366d6f624103de7001ad64bc9ad88..5a99878b88c6242b76964bc07399f1fdcba4a38a 100644 (file)
@@ -43,7 +43,7 @@ def setup_module(mod):
 
     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))
         )
@@ -84,7 +84,7 @@ def test_bgp_default_originate_route_map():
 
     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")
@@ -94,7 +94,7 @@ def test_bgp_default_originate_route_map():
 
     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")
@@ -102,7 +102,7 @@ def test_bgp_default_originate_route_map():
 
     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")
@@ -112,7 +112,7 @@ def test_bgp_default_originate_route_map():
 
     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"
 
 
index f94620b2c97751df1f556174f36392e200e5a55a..3a374c6e9aed325bec8e38f996adb972013c00f3 100644 (file)
@@ -42,7 +42,7 @@ def setup_module(mod):
 
     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))
         )
@@ -90,12 +90,12 @@ def test_bgp_default_originate_route_map():
         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
index e633b61d1b0300b1e5fba86285c23f9fbc89acf2..ba278295a6da8ad23e6cc287a0584956b7ed7f57 100644 (file)
@@ -41,7 +41,7 @@ def setup_module(mod):
 
     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))
         )
index 70562ce31f3b7b71bba374fb7a1eef90a7986811..6978008740eee79e091c152315fd6d416445b5ef 100644 (file)
@@ -46,7 +46,7 @@ def setup_module(mod):
 
     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))
         )
@@ -98,7 +98,7 @@ def test_bgp_disable_addpath_rx():
         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.")
@@ -120,7 +120,7 @@ def test_bgp_disable_addpath_rx():
         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."
 
 
index 2ca50aa56ead36dba08e1c0dca23a246f88ed777..87802511b5e69cc23232a7d69c981c939b69f933 100644 (file)
@@ -51,7 +51,7 @@ def setup_module(mod):
 
     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))
         )
@@ -101,14 +101,14 @@ def test_bgp_maximum_prefix_invalid():
         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
index 8269322215397995f8beae449d218d46f95a7b0c..28d6b56303b2965b4b048d8ddb72445a3ed2b968 100644 (file)
@@ -34,7 +34,7 @@ def setup_module(mod):
 
     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))
         )
index d9ccd6979cf09ad06e37f86d59e02f939c6a7780..a4ac249cb747aba93b0d6a096eaa81b3e0a21540 100644 (file)
@@ -52,7 +52,7 @@ def setup_module(mod):
 
     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))
         )
@@ -90,7 +90,7 @@ def test_bgp_ebgp_common_subnet_nh_unchanged():
         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)
 
@@ -100,7 +100,7 @@ def test_bgp_ebgp_common_subnet_nh_unchanged():
         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)
 
index 6e3b2859c43114c77d93953d15450e7bee93d745..f7c0f70445dea86125cff4c5e32b1461f817e80e 100644 (file)
@@ -71,7 +71,7 @@ def setup_module(mod):
 
     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))
         )
@@ -125,31 +125,31 @@ def test_ebgp_requires_policy():
     # 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"
 
 
index a5e5bdcee904edd53d48adf0fed1717a294c4fa0..5f6eb1726103575f9c2c62dd79a0a59960136c17 100644 (file)
@@ -47,7 +47,7 @@ def setup_module(mod):
 
     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))
         )
index a5db20e47490692eac9d1067cefb876b4d120b46..c67bc91f631eb5937bf1a9f0641a2d0da9c6ad09 100644 (file)
@@ -34,7 +34,7 @@ def setup_module(mod):
 
     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))
         )
index 2ffcb723ec42ae89b392cc81946a406f8821c5d7..16459a25a33dcd8d837ad9f4654cc3659c57ee00 100644 (file)
@@ -50,7 +50,7 @@ def setup_module(mod):
 
     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))
         )
index 61a0fe63c18093385dc0f6208ed6a8bbdc812cc1..cfe63d20bafdb9e0ba209e491f4f6c22303146f0 100644 (file)
@@ -108,7 +108,7 @@ def setup_module(mod):
     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))
         )
index c7cb213de5d776cc6753008026e2bb6e0c144b34..66eeeb468daa16a8042eab71e40d2cc671232478 100644 (file)
@@ -45,7 +45,7 @@ def setup_module(mod):
 
     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))
         )
index ea974b5302fe6957a034db00b23715320c0e111a..aaa68ea340aa40f8fdb833ecca95fd749b3e9f50 100644 (file)
@@ -41,7 +41,7 @@ def setup_module(mod):
 
     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))
         )
index 7c23a3e8990e1410f021b44d7d84817a23079357..84a9c8b723535e22a7a1a847b6877c6864da34d9 100644 (file)
@@ -56,7 +56,7 @@ def setup_module(mod):
         )
         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))
         )
index f4bb487e4091238245e75f3620267208c7a9d12e..25fd0dbb71a409bafd53ce91dd9b9683b656407d 100644 (file)
@@ -57,7 +57,7 @@ def setup_module(mod):
 
     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))
         )
index 34c23d9b6fe7bb686069f765f2b5a7a5f6032043..d1d384182c0f3e687c9d6332e93e0c259a9d816d 100644 (file)
@@ -42,7 +42,7 @@ def setup_module(mod):
 
     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))
         )
index 7023e3a503e80b6aa2e9b02fc53ff8fa65e8216e..49681c6a690a95d23dd108341e7830abb3e36301 100644 (file)
@@ -61,7 +61,7 @@ def setup_module(mod):
 
     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))
         )
index d7897cfcb9ed3eefa7fb0de228ee352a8cdbd6f3..2a3753e26cbfecfae46d93029ff498c661c8d5cf 100644 (file)
@@ -65,7 +65,7 @@ def setup_module(mod):
 
     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))
         )
index 9e5f146b47cb225cc19536c10621ae2afde1db10..e61bb0d1558f5c586b18957f56d49d9b2771b031 100644 (file)
@@ -46,7 +46,7 @@ def setup_module(mod):
 
     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))
         )
index 930fd791b0a51a18f0c23aa4750ae511b5140be6..c58322a4c0ab4ddd2dc0d3c8187365e93c913b24 100644 (file)
@@ -63,7 +63,7 @@ def setup_module(mod):
 
     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))
         )
index 9d22a799a6b584fc6cae12d0c101526b334bb56a..23eb80f316761b2598f42fe174d6ef950b1be113 100644 (file)
@@ -50,7 +50,7 @@ def setup_module(mod):
 
     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))
         )
index 0656e1ed41e462fbaddf62c2755bdd149ed5903b..18ffc6a17d9feca6ab0065721ed8abf806a155c3 100644 (file)
@@ -142,7 +142,7 @@ def test_converge_bgplu():
         "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
@@ -153,7 +153,7 @@ def test_converge_bgplu():
         "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"
 
 
@@ -178,7 +178,7 @@ def test_traffic_connectivity():
     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"
 
 
index a9810ba264b3e154064c5f66170081fcdf7d2ca3..545d7bd245a917a5507a6f62f6a821f5a6eb06ba 100644 (file)
@@ -43,7 +43,7 @@ def setup_module(mod):
 
     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))
         )
@@ -82,17 +82,17 @@ def test_bgp_max_med_on_startup():
 
     # 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"
 
 
index c6bdbc3c1cce54738939d064ac7c4236355f4790..5edc0b55ffc1ee782bde75079d539085c18cae09 100644 (file)
@@ -50,7 +50,7 @@ def setup_module(mod):
 
     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))
         )
index 0b346f63d51e0a2b29be69580efba09bcb9e9972..aad5f36480e859d9e2258b7cc33371a5161cbe78 100644 (file)
@@ -45,7 +45,7 @@ def setup_module(mod):
 
     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))
         )
@@ -177,7 +177,7 @@ def test_bgp_maximum_prefix_out():
             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)
 
index 9f4d9682778a699d558f7a1018fccb197fbec2b3..c9ff2ffc7e7ca2410b400d024c566a8cf26ac37f 100755 (executable)
@@ -40,7 +40,7 @@ def setup_module(mod):
 
     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))
         )
@@ -76,7 +76,7 @@ def test_bgp_minimum_holdtime():
         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"
 
 
index 23e820b4fc39b9937a4c949c6c3acfc98e861d09..b53673ad0f2f0f182890de25658d74a5ca2f248b 100644 (file)
@@ -46,7 +46,7 @@ def setup_module(mod):
 
     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()
index 47c055688477c6fe441bb14edbead7bb25f17ba1..bc6a85b4b9d3148674b0e83e183cce098eaab6a0 100644 (file)
@@ -37,7 +37,7 @@ def setup_module(mod):
 
     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))
         )
index 30083b4de274f3572560355353074ccc139329a2..d486a87e9c89fb9cea4137bb1df6fd5cb93e785e 100644 (file)
@@ -57,7 +57,7 @@ def setup_module(mod):
     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))
         )
index 926982623396f6760643abcb84552a42defcb68b..c6ee9aa73c4ccc4aaf4ca27d782dc3a1288eb9fc 100644 (file)
@@ -34,7 +34,7 @@ def setup_module(mod):
 
     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))
         )
index 5cbcd19be92dabbe2cc9f71bd46e29f80566e4c2..7d476b053852384d37d2460c5dd7a991ff847ac5 100644 (file)
@@ -47,7 +47,7 @@ def setup_module(mod):
 
     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))
         )
index 5d6440ce6adde09f2d4c03982292d4a740b0667e..1871d3efc8cef82398589ee11b10167fd507e2fe 100644 (file)
@@ -33,7 +33,7 @@ def setup_module(mod):
 
     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))
         )
index 1e6e731a1872ec2c0bb13d7970ca76fba2aa3933..fca60e8ceab16228fe182f76a0dbc5bc0207f97c 100644 (file)
@@ -93,11 +93,11 @@ def test_r1_receive_and_advertise_prefix_sid_type1():
         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)
 
 
@@ -160,11 +160,11 @@ def test_peer2_receive_prefix_sid_type1():
         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")
 
 
index 97366ebd5338784563bba0b6fea149e5cb8d7c5e..b9d8ce681914224e4ebfcf85a5acfb24ed44b4c9 100644 (file)
@@ -56,7 +56,7 @@ def setup_module(mod):
 
     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))
         )
@@ -114,19 +114,19 @@ def test_bgp_reject_as_sets():
         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
index e48f81c53dd8eee14b5f7434594e1acac4a7e964..2d8864c34ae13f78b1e94229c504d34b8f0449c3 100644 (file)
@@ -109,7 +109,7 @@ def setup_module(mod):
 
     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")
         )
index d9402f2743a3fbecee41147065385c32927b1683..e3e4567aeb0371e2cb67f47e4f4de510b7f926eb 100644 (file)
@@ -41,7 +41,7 @@ def setup_module(mod):
 
     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()
index ef7c94bbab0ff86d8b81f69acf5222e69bf3d9a5..2e5592e2ab9254ba182e2daa15788ba034ef38ac 100644 (file)
@@ -43,7 +43,7 @@ def setup_module(mod):
 
     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))
         )
@@ -86,7 +86,7 @@ def test_bgp_extcommunity_none():
         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):
@@ -111,7 +111,7 @@ def test_bgp_extcommunity_none():
         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"
 
 
index 52fda695c3cd7ff543cf43c9ed8df3b09bb6c2e1..29ff1065fd69efab5261e83a1b704fbf9590ef5d 100644 (file)
@@ -82,7 +82,7 @@ def test_correct_pair(tgen):
     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"
@@ -100,7 +100,7 @@ def test_role_pair_mismatch(tgen):
     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"
 
 
@@ -111,7 +111,7 @@ def test_single_role_advertising(tgen):
     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"
@@ -129,7 +129,7 @@ def test_single_role_receiving(tgen):
     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"
@@ -145,7 +145,7 @@ def test_role_strict_mode(tgen):
     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"
 
 
index b3715863b58365c092d984b2222db92365cb44b2..a43518bc8a7d883f9885672114d24c3becb28670 100644 (file)
@@ -69,7 +69,7 @@ def test_r10_routes(tgen):
         ]
         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"
index f7a66fdad1bf2ad17903a9b61cb0d91c1fb18fd8..d791ef486bf09a9d43aca734c8968da72b9a8227 100644 (file)
@@ -32,7 +32,7 @@ def setup_module(mod):
 
     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))
         )
index 93a514bf6a5cde725efd23c9a414a0a758dc23be..35ce0926975e88d569907c623d05d4156a227e06 100644 (file)
@@ -41,7 +41,7 @@ def setup_module(mod):
 
     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))
         )
@@ -97,7 +97,7 @@ def test_bgp_route_map_match_ipv6_next_hop_access_list():
         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"
 
 
index 2828796405cd8d4459068ad1688ee4bdd3de911a..c766f5c1a815aa9a5fe15bfefc5bfcd849d59016 100644 (file)
@@ -46,7 +46,7 @@ def setup_module(mod):
 
     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()
index 8fe45a349838dbff16f27f47d851e2ad1622d57c..5b5256f43d9242f41bf3a626908bc035f5433b23 100644 (file)
@@ -42,7 +42,7 @@ def setup_module(mod):
 
     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))
         )
@@ -83,12 +83,12 @@ def test_bgp_route_map_on_match_next():
 
     # 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
@@ -102,7 +102,7 @@ def test_bgp_route_map_on_match_next():
 
     # 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"
 
 
index 37082b484c711917941295b057bda123a6a2fce2..5ce8b17f249a8501f1043864219740d91ed8c823 100644 (file)
@@ -61,7 +61,7 @@ def setup_module(mod):
 
     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))
         )
index 18b7831a4af68e53f6cd460187372842b20b0a7a..29d9842d59dddc8fcf359e77d6c70600726876ae 100644 (file)
@@ -44,7 +44,7 @@ def setup_module(mod):
 
     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))
         )
index f52b28a0620c7fef959db9b8b8a70fdb11794bcb..7b40bbdae82d62883f707a96aad56924a28bf926 100644 (file)
@@ -44,7 +44,7 @@ def setup_module(mod):
 
     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))
         )
index db6dbc61d2201ffa0cbd99d3f003336a197aa12a..6983a35173cbbed21098e36ceca031ea409fca36 100644 (file)
@@ -50,7 +50,7 @@ def setup_module(mod):
 
     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))
         )
index d373a749fe87e63c0443f8f53accb80e1716d380..64cc48e54ff826b0088c0798ae524e97042ce5ac 100644 (file)
@@ -46,7 +46,7 @@ def setup_module(mod):
 
     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))
         )
index c0e19fa35690ed7ab9ceca80a9507ce8722d7afc..fe4eda60f5c01a04642b442b648065965ef23b32 100644 (file)
@@ -48,7 +48,7 @@ def setup_module(mod):
 
     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))
         )
index 292cf70d3617dd1e824f920342e0bbd711950081..e201ec9ff74dec3b5bc0592c0e4d56a5c0db749f 100644 (file)
@@ -47,7 +47,7 @@ def setup_module(mod):
 
     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))
         )
@@ -100,12 +100,12 @@ def test_bgp_set_local_preference():
         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
index c867208d3945d060db49be0287c0690548579e7d..9aff53a03082be66a01ab50d9f18a5991a2dfcb7 100644 (file)
@@ -34,7 +34,7 @@ def setup_module(mod):
 
     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))
         )
index 967bed021358a8f69a26a5f66c3fb72d31fb95e6..b0c70f208ebb7524a8890bcac4217cb41d8ac7a7 100644 (file)
@@ -73,7 +73,7 @@ def setup_module(mod):
 
     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))
         )
index 984cf97e288b4cd450968b0197c9d18c77178ec4..787707cc0f6282f41381d28b874ecc34fa2c6d89 100755 (executable)
@@ -106,7 +106,7 @@ def setup_module(mod):
     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))
         )
@@ -180,7 +180,7 @@ def check_rib(name, cmd, expected_file):
     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"
 
 
index 4afaeaf78a4e5106bb679fd93a17b2308667e8a5..5d18083fd5e3467565586f981db6b39c5ac78b35 100755 (executable)
@@ -147,7 +147,7 @@ def check_rib(name, cmd, expected_file):
     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"
 
 
index 914c29f0c1ddf2b493f9e40538dacdf8cb88c9fa..38baf434426dd8ab9d1e919ebec87b6e043af132 100755 (executable)
@@ -109,7 +109,7 @@ def check_rib(name, cmd, expected_file):
     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"
 
 
index 8a7b558be360a97ab6149edcf6393f7e4dcb6562..92a30788fc4b9020804d9194e51f47b9c98b0a6c 100644 (file)
@@ -106,7 +106,7 @@ def check_rib(name, cmd, expected_file):
     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"
 
 
index ec14ef065f8352319faab67f432ac2da2ece2029..fa8a88297f3fa2fd8055ebd2c240eb3386af9b89 100644 (file)
@@ -47,7 +47,7 @@ def setup_module(mod):
 
     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))
         )
index 4855d5c7d21a9886dca9b17e4cb343a266c23c13..37949cdc99671196e3bae6cadb2294fb177b159b 100644 (file)
@@ -52,7 +52,7 @@ def setup_module(mod):
 
     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))
         )
@@ -108,7 +108,7 @@ def test_bgp_tcp_mss():
 
     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))
@@ -129,7 +129,7 @@ def test_bgp_tcp_mss():
         "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
     )
@@ -138,7 +138,7 @@ def test_bgp_tcp_mss():
         "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)
@@ -148,7 +148,7 @@ def test_bgp_tcp_mss():
         "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)
index cd405f7b22898f58ba250f13bc4d0e68a9115405..a2eacc7ab272c53d1f0f11037ab92e035d8411fe 100644 (file)
@@ -41,7 +41,7 @@ def setup_module(mod):
 
     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()
index 2a53547f59bde0c1abfa2755e4801de983b975af..4d4e29b2f87598abf4808c0b07c9abaabd9f79c1 100644 (file)
@@ -42,7 +42,7 @@ def setup_module(mod):
 
     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))
         )
@@ -84,7 +84,7 @@ def test_bgp_unnumbered_removal():
 
     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"])
 
@@ -109,7 +109,7 @@ def test_bgp_unnumbered_removal():
 
     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"
 
index 4e66cf5548ab17068138ee282dd8a8b2a2d003e4..59f4bcd38510f88f667187b209347c839f7e3562 100644 (file)
@@ -90,7 +90,7 @@ def setup_module(mod):
 
     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))
         )
@@ -169,7 +169,7 @@ def test_bgp_update_delay():
 
     # 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)
 
@@ -195,7 +195,7 @@ def test_bgp_update_delay():
     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
@@ -203,7 +203,7 @@ def test_bgp_update_delay():
 
     # 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
@@ -219,7 +219,7 @@ def test_bgp_update_delay():
     )
 
     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
@@ -229,7 +229,7 @@ def test_bgp_update_delay():
     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
@@ -250,7 +250,7 @@ def test_bgp_update_delay():
     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
@@ -266,14 +266,14 @@ def test_bgp_update_delay():
 
     # 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)
 
@@ -281,7 +281,7 @@ def test_bgp_update_delay():
     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
index eb29875d5036da2801ee3f55bbd818d7eb6633ba..695cfc3d25d64f8c31c87b7371aea04c7dd4843e 100644 (file)
@@ -67,7 +67,7 @@ def setup_module(mod):
 
     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))
         )
index 39865eb189bba27f2904b5ac2e88a44afa9bc512..8e2e4017df8dbd29ddf0db1b31e3b78812613147 100644 (file)
@@ -203,7 +203,7 @@ def bgp_vpnv4_prefix_check(router, rd, prefix, label, nexthop):
         )
 
     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
     )
@@ -324,7 +324,7 @@ def check_show_bgp_vpn_ok(router, vpnv4_entries):
 
     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
         )
@@ -456,7 +456,7 @@ def test_r3_prefixes_removed():
             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
@@ -491,7 +491,7 @@ def test_r3_prefixes_removed():
         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(
@@ -502,7 +502,7 @@ def test_r3_prefixes_removed():
     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]
     )
@@ -536,7 +536,7 @@ def test_r3_prefixes_added_back():
         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(
@@ -564,7 +564,7 @@ def test_r3_prefixes_added_back():
             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
@@ -611,7 +611,7 @@ def test_unconfigure_nexthop_change_nexthop_self():
         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
         )
@@ -626,7 +626,7 @@ def test_unconfigure_nexthop_change_nexthop_self():
             "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
         )
@@ -639,7 +639,7 @@ def test_unconfigure_nexthop_change_nexthop_self():
             "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
         )
@@ -727,7 +727,7 @@ def test_declare_vpn_network_with_different_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
         )
@@ -787,7 +787,7 @@ def test_filter_vpn_network_from_r1():
             "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
         )
@@ -804,7 +804,7 @@ def test_filter_vpn_network_from_r1():
         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
         )
@@ -833,7 +833,7 @@ def test_unfilter_vpn_network_from_r1():
     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 = {
index 189824311dfefc628d69a25de1531a0d871a364c..dd9d54742b719843f6d658fd5b9e98f25fb1ecb9 100644 (file)
@@ -245,7 +245,7 @@ router bgp 65500 vrf vrf1
         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)
 
 
@@ -279,7 +279,7 @@ route-map RMAP permit 1
         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)
 
 
@@ -309,7 +309,7 @@ route-map RMAP permit 1
         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)
 
 
@@ -339,7 +339,7 @@ router bgp 65500 vrf vrf1
         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)
 
 
@@ -371,7 +371,7 @@ route-map RMAP permit 1
         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)
 
 
@@ -400,7 +400,7 @@ route-map RMAP permit 1
         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)
 
 
@@ -482,7 +482,7 @@ router bgp 65501
         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"
 
 
index d4c355a44a1d092225972dffab33bcece8befd8b..b0178805456b97fdb02472571cd2dd9c82b88b52 100644 (file)
@@ -174,7 +174,7 @@ def bgp_vpnv4_table_check(router, group, label_list=None, label_value_expected=N
     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
         )
@@ -305,7 +305,7 @@ def mpls_table_check(router, blacklist=None, label_list=None, whitelist=None):
     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)
 
 
@@ -450,7 +450,7 @@ def test_flapping_bgp_vrf_down():
     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 ?"
@@ -488,7 +488,7 @@ def test_flapping_bgp_vrf_up():
         "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 ?"
@@ -518,7 +518,7 @@ def test_recursive_route():
         "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"])
@@ -544,7 +544,7 @@ def test_recursive_route():
         "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"
 
 
@@ -570,7 +570,7 @@ def test_prefix_changes_interface():
         "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
@@ -616,7 +616,7 @@ def test_prefix_changes_interface():
         "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)
@@ -633,7 +633,7 @@ def test_prefix_changes_interface():
         "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()
@@ -699,7 +699,7 @@ def test_changing_default_label_value():
     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
@@ -746,7 +746,7 @@ def test_unconfigure_allocation_mode_nexthop():
     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
@@ -794,7 +794,7 @@ def test_reconfigure_allocation_mode_nexthop():
     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
index 3d5f8f643bc67da06ad1b349aa9efdd91390960d..3879687aac8e750ce8b4dfd3e01a6c1dbd15a1eb 100644 (file)
@@ -173,7 +173,7 @@ def bgp_vpnv6_table_check(router, group, label_list=None, label_value_expected=N
     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
         )
@@ -300,7 +300,7 @@ def mpls_table_check(router, blacklist=None, label_list=None, whitelist=None):
     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)
 
 
@@ -446,7 +446,7 @@ def test_flapping_bgp_vrf_down():
     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 ?"
@@ -488,7 +488,7 @@ def test_flapping_bgp_vrf_up():
         "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 ?"
@@ -526,7 +526,7 @@ def test_recursive_route():
 
     # 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
@@ -549,7 +549,7 @@ def test_recursive_route():
 
     # 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"
 
 
@@ -575,7 +575,7 @@ def test_prefix_changes_interface():
         "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
@@ -621,7 +621,7 @@ def test_prefix_changes_interface():
         "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)
@@ -638,7 +638,7 @@ def test_prefix_changes_interface():
         "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()
@@ -704,7 +704,7 @@ def test_changing_default_label_value():
     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
@@ -750,7 +750,7 @@ def test_unconfigure_allocation_mode_nexthop():
     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