]> git.proxmox.com Git - mirror_frr.git/blobdiff - tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
tests: fix pylint infra errors
[mirror_frr.git] / tests / topotests / evpn_type5_test_topo1 / test_evpn_type5_chaos_topo1.py
old mode 100755 (executable)
new mode 100644 (file)
index 941593e..86253ac
@@ -51,7 +51,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
 # Import topogen and topotest helpers
 from lib.topotest import version_cmp
 from lib.topogen import Topogen, get_topogen
-from mininet.topo import Topo
+from lib.micronet_compat import Topo
 
 from lib.common_config import (
     start_topology,
@@ -62,7 +62,6 @@ from lib.common_config import (
     verify_rib,
     step,
     start_router_daemons,
-    kill_router_daemons,
     create_static_routes,
     create_vrf_cfg,
     create_route_maps,
@@ -72,7 +71,7 @@ from lib.common_config import (
     configure_brctl,
     apply_raw_config,
     verify_vrf_vni,
-    verify_cli_json
+    verify_cli_json,
 )
 
 from lib.topolog import logger
@@ -82,10 +81,13 @@ from lib.bgp import (
     clear_bgp,
     verify_best_path_as_per_bgp_attribute,
     verify_attributes_for_evpn_routes,
-    verify_evpn_routes
+    verify_evpn_routes,
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/evpn_type5_chaos_topo1.json".format(CWD)
 try:
@@ -97,7 +99,6 @@ except IOError:
 # Reading the data from JSON File for topology creation
 # Global variables
 TCPDUMP_FILE = "evpn_log.txt"
-LOGDIR = "/tmp/topotests/"
 NETWORK1_1 = {"ipv4": "10.1.1.1/32", "ipv6": "10::1/128"}
 NETWORK1_2 = {"ipv4": "40.1.1.1/32", "ipv6": "40::1/128"}
 NETWORK1_3 = {"ipv4": "40.1.1.2/32", "ipv6": "40::2/128"}
@@ -178,9 +179,11 @@ def setup_module(mod):
     # Creating configuration from JSON
     build_config_from_json(tgen, topo)
 
-    if version_cmp(platform.release(), '4.19') < 0:
-        error_msg = ('EVPN tests will not run (have kernel "{}", '
-            'but it requires >= 4.19)'.format(platform.release()))
+    if version_cmp(platform.release(), "4.19") < 0:
+        error_msg = (
+            'EVPN tests will not run (have kernel "{}", '
+            "but it requires >= 4.19)".format(platform.release())
+        )
         pytest.skip(error_msg)
 
     global BGP_CONVERGENCE
@@ -390,9 +393,9 @@ def test_verify_overlay_index_p1(request):
                         "network": NETWORK3_1[addr_type],
                         "next_hop": NEXT_HOP_IP[addr_type],
                         "vrf": "GREEN",
-                    }
+                    },
                 ]
-            }
+            },
         }
 
         result = create_static_routes(tgen, input_dict_1)
@@ -464,7 +467,7 @@ def test_evpn_cli_json_available_p1(request):
             "cli": [
                 "show evpn vni detail",
                 "show bgp l2vpn evpn all overlay",
-                "show bgp l2vpn evpn vni"
+                "show bgp l2vpn evpn vni",
             ]
         }
     }
@@ -517,9 +520,9 @@ def test_RT_verification_auto_p0(request):
                         "network": NETWORK4_1[addr_type],
                         "next_hop": NEXT_HOP_IP[addr_type],
                         "vrf": "GREEN",
-                    }
+                    },
                 ]
-            }
+            },
         }
 
         result = create_static_routes(tgen, input_dict_1)