]> git.puffer.fish Git - mirror/frr.git/commitdiff
test: fix the topotest case for the bug fix 13868/head
authorJack.zhang <hanyu.zly@alibaba-inc.com>
Fri, 30 Jun 2023 12:13:36 +0000 (20:13 +0800)
committerJack.zhang <hanyu.zly@alibaba-inc.com>
Tue, 18 Jul 2023 06:19:46 +0000 (14:19 +0800)
Signed-off-by: Jack.zhang <hanyu.zly@alibaba-inc.com>
tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py
tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo1.py

index 6b9dc3e94ae933eb6421ffb9497169c6145c04b0..32643c27b8bdfcf986191702b0f3fb97b99cde38 100644 (file)
@@ -156,7 +156,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         check_router_status(tgen)
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Redistribute configured static routes into BGP process" " on R1/R2 and R3"
         )
@@ -188,7 +187,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Import from default vrf into vrf ISR on R1 and R2 as below")
 
         input_dict_vrf = {}
@@ -246,7 +244,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     )
 
     for addr_type in ADDR_TYPES:
-
         step("Verify Pre-emption")
 
         input_routes_r3 = {
@@ -278,7 +275,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     shutdown_bringup_interface(tgen, "r4", intf_r4_r1, False)
 
     for addr_type in ADDR_TYPES:
-
         input_routes_r3 = {
             "r3": {"static_routes": [{"network": [NETWORK3_3[addr_type]]}]}
         }
@@ -309,7 +305,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     shutdown_bringup_interface(tgen, "r4", intf_r4_r1, True)
 
     for addr_type in ADDR_TYPES:
-
         input_routes_r3 = {
             "r3": {"static_routes": [{"network": [NETWORK3_3[addr_type]]}]}
         }
@@ -339,7 +334,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     step("Active-Standby scenario(as-path prepend and Local pref)")
 
     for addr_type in ADDR_TYPES:
-
         step("Create prefix-list")
 
         input_dict_pf = {
@@ -363,7 +357,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Create route-map to match prefix-list and set localpref 500")
 
         input_dict_rm = {
@@ -471,15 +464,10 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     attribute = "locPrf"
 
     for addr_type in ADDR_TYPES:
-
         step("Verify bestpath is installed as per highest localpref")
 
         input_routes_r3 = {
-            "r3": {
-                "static_routes": [
-                    {"network": [NETWORK3_3[addr_type], NETWORK3_4[addr_type]]}
-                ]
-            }
+            "r3": {"static_routes": [{"network": [NETWORK3_4[addr_type]]}]}
         }
 
         result = verify_best_path_as_per_bgp_attribute(
@@ -490,7 +478,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Create route-map to match prefix-list and set localpref 700")
 
         input_dict_rm = {
@@ -518,15 +505,10 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Verify bestpath is changed as per highest localpref")
 
         input_routes_r3 = {
-            "r3": {
-                "static_routes": [
-                    {"network": [NETWORK3_3[addr_type], NETWORK3_4[addr_type]]}
-                ]
-            }
+            "r3": {"static_routes": [{"network": [NETWORK3_4[addr_type]]}]}
         }
 
         result = verify_best_path_as_per_bgp_attribute(
@@ -537,7 +519,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Create route-map to match prefix-list and set as-path prepend")
 
         input_dict_rm = {
@@ -570,15 +551,10 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     attribute = "path"
 
     for addr_type in ADDR_TYPES:
-
         step("Verify bestpath is changed as per shortest as-path")
 
         input_routes_r3 = {
-            "r3": {
-                "static_routes": [
-                    {"network": [NETWORK3_3[addr_type], NETWORK3_4[addr_type]]}
-                ]
-            }
+            "r3": {"static_routes": [{"network": [NETWORK3_4[addr_type]]}]}
         }
 
         result = verify_best_path_as_per_bgp_attribute(
@@ -607,7 +583,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         check_router_status(tgen)
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Configure route-map to set community attribute for a specific"
             "prefix on R1 in vrf ISR"
@@ -672,7 +647,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Apply this route-map on R1 to vrf ISR while redistributing the"
             " prefixes into BGP"
@@ -714,7 +688,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Configure another route-map for filtering the prefixes based on"
             " community attribute while importing into default vrf"
@@ -740,7 +713,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Apply the route-map while Importing vrf ISR's prefixes into "
             "default vrf on router R1:"
@@ -787,7 +759,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Verify on R1 that only prefixes with community value 100:100"
             "in vrf ISR are imported to vrf default. While importing, the"
@@ -808,7 +779,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Add set clause in route-map IMP:")
 
         input_dict_rm = {
@@ -835,7 +805,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Verify that as we continue adding different attributes "
             "step-by-step in route-map IMP those attributes gets "
@@ -898,7 +867,6 @@ def test_modify_route_map_match_set_clauses_p1(request):
     assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
 
     for addr_type in ADDR_TYPES:
-
         input_routes_r1 = {
             "r1": {
                 "static_routes": [
index 934c4dc05fda54b7de7d6a1ce5dd1b6f737d8e02..f3521969d3f473db097f1a79f3647a8ee743d436 100644 (file)
@@ -52,7 +52,7 @@ from lib.bgp import (
     verify_bgp_community,
     verify_bgp_rib,
     clear_bgp,
-    verify_best_path_as_per_bgp_attribute
+    verify_best_path_as_per_bgp_attribute,
 )
 from lib.topojson import build_config_from_json
 
@@ -463,7 +463,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         check_router_status(tgen)
 
     for addr_type in ADDR_TYPES:
-
         step(
             "Redistribute configured static routes into BGP process" " on R1/R2 and R3"
         )
@@ -495,7 +494,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Import from default vrf into vrf ISR on R1 and R2 as below")
 
         input_dict_vrf = {}
@@ -553,7 +551,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     )
 
     for addr_type in ADDR_TYPES:
-
         step("Verify Pre-emption")
 
         input_routes_r3 = {
@@ -585,7 +582,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     shutdown_bringup_interface(tgen, "r4", intf_r4_r1, False)
 
     for addr_type in ADDR_TYPES:
-
         input_routes_r3 = {
             "r3": {"static_routes": [{"network": [NETWORK3_3[addr_type]]}]}
         }
@@ -616,7 +612,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     shutdown_bringup_interface(tgen, "r4", intf_r4_r1, True)
 
     for addr_type in ADDR_TYPES:
-
         input_routes_r3 = {
             "r3": {"static_routes": [{"network": [NETWORK3_3[addr_type]]}]}
         }
@@ -646,7 +641,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     step("Active-Standby scenario(as-path prepend and Local pref)")
 
     for addr_type in ADDR_TYPES:
-
         step("Create prefix-list")
 
         input_dict_pf = {
@@ -670,7 +664,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Create route-map to match prefix-list and set localpref 500")
 
         input_dict_rm = {
@@ -778,15 +771,10 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     attribute = "locPrf"
 
     for addr_type in ADDR_TYPES:
-
         step("Verify bestpath is installed as per highest localpref")
 
         input_routes_r3 = {
-            "r3": {
-                "static_routes": [
-                    {"network": [NETWORK3_3[addr_type], NETWORK3_4[addr_type]]}
-                ]
-            }
+            "r3": {"static_routes": [{"network": [NETWORK3_4[addr_type]]}]}
         }
 
         result = verify_best_path_as_per_bgp_attribute(
@@ -797,7 +785,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Create route-map to match prefix-list and set localpref 700")
 
         input_dict_rm = {
@@ -825,15 +812,10 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Verify bestpath is changed as per highest localpref")
 
         input_routes_r3 = {
-            "r3": {
-                "static_routes": [
-                    {"network": [NETWORK3_3[addr_type], NETWORK3_4[addr_type]]}
-                ]
-            }
+            "r3": {"static_routes": [{"network": [NETWORK3_4[addr_type]]}]}
         }
 
         result = verify_best_path_as_per_bgp_attribute(
@@ -844,7 +826,6 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
         )
 
     for addr_type in ADDR_TYPES:
-
         step("Create route-map to match prefix-list and set as-path prepend")
 
         input_dict_rm = {
@@ -877,15 +858,10 @@ def test_bgp_best_path_with_dynamic_import_p0(request):
     attribute = "path"
 
     for addr_type in ADDR_TYPES:
-
         step("Verify bestpath is changed as per shortest as-path")
 
         input_routes_r3 = {
-            "r3": {
-                "static_routes": [
-                    {"network": [NETWORK3_3[addr_type], NETWORK3_4[addr_type]]}
-                ]
-            }
+            "r3": {"static_routes": [{"network": [NETWORK3_4[addr_type]]}]}
         }
 
         result = verify_best_path_as_per_bgp_attribute(