# 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,
configure_brctl,
apply_raw_config,
verify_vrf_vni,
- verify_cli_json
+ verify_cli_json,
)
from lib.topolog import logger
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:
# 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"}
# 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
"network": NETWORK3_1[addr_type],
"next_hop": NEXT_HOP_IP[addr_type],
"vrf": "GREEN",
- }
+ },
]
- }
+ },
}
result = create_static_routes(tgen, input_dict_1)
"cli": [
"show evpn vni detail",
"show bgp l2vpn evpn all overlay",
- "show bgp l2vpn evpn vni"
+ "show bgp l2vpn evpn vni",
]
}
}
"network": NETWORK4_1[addr_type],
"next_hop": NEXT_HOP_IP[addr_type],
"vrf": "GREEN",
- }
+ },
]
- }
+ },
}
result = create_static_routes(tgen, input_dict_1)