# pylint: disable=C0413
# Import topogen and topotest helpers
-from lib.topogen import get_topogen
-from lib import topojson
+from lib.topogen import Topogen, get_topogen
from lib.common_config import (
write_test_header,
reset_config_on_routers,
shutdown_bringup_interface,
apply_raw_config,
+ start_topology,
)
from lib.topolog import logger
+from lib.topojson import build_config_from_json
from lib.bgp import create_router_bgp, verify_bgp_convergence
-
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
logger.info("Testsuite start time: {}".format(testsuite_run_time))
logger.info("=" * 40)
- tgen = topojson.setup_module_from_json(mod.__file__)
+ # This function initiates the topology build with Topogen...
+ json_file = "{}/ibgp_ecmp_topo3.json".format(CWD)
+ tgen = Topogen(json_file, mod.__name__)
+ global topo
topo = tgen.json_topo
+ # Starting topology, create tmp files which are loaded to routers
+ # to start daemons and then start routers
+ start_topology(tgen)
+
+ # Creating configuration from JSON
+ build_config_from_json(tgen, topo)
+
# Don't run this test if we have any failure.
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
return True
-def start_topology(tgen, daemon=None):
+def start_topology(tgen):
"""
Starting topology, create tmp files which are loaded to routers
to start daemons and then start routers
socat_send_mld_join,
socat_send_pim6_traffic,
kill_socat,
- topo_daemons,
)
from lib.pim import (
create_pim_config,
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, TOPO)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
socat_send_mld_join,
socat_send_pim6_traffic,
kill_socat,
- topo_daemons,
)
from lib.pim import (
create_pim_config,
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, TOPO)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
apply_raw_config,
run_frr_cmd,
required_linux_kernel_version,
- topo_daemons,
verify_rib,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
reset_config_on_routers,
run_frr_cmd,
required_linux_kernel_version,
- topo_daemons,
verify_rib,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, tgen.json_topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start deamons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, tgen.json_topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start deamons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, tgen.json_topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start deamons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, tgen.json_topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, TOPO)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
kill_router_daemons,
start_router_daemons,
create_static_routes,
- topo_daemons,
)
from lib.pim import (
create_pim_config,
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, TOPO)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
kill_router_daemons,
start_router_daemons,
create_static_routes,
- topo_daemons,
)
from lib.pim import (
create_pim_config,
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, TOPO)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
stop_router,
create_static_routes,
required_linux_kernel_version,
- topo_daemons,
)
from lib.bgp import create_router_bgp
from lib.pim import (
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, tgen.json_topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start deamons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Don"t run this test if we have any failure.
if tgen.routers_have_failure():
start_router_daemons,
create_route_maps,
shutdown_bringup_interface,
- topo_daemons,
create_prefix_lists,
create_route_maps,
create_interfaces_cfg,
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
verify_rib,
create_static_routes,
step,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
shutdown_bringup_interface,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
write_test_footer,
reset_config_on_routers,
step,
- topo_daemons,
verify_rib,
stop_router,
start_router,
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
create_static_routes,
step,
shutdown_bringup_interface,
- topo_daemons,
)
from lib.topolog import logger
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
verify_rib,
create_static_routes,
step,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
shutdown_bringup_interface,
stop_router,
start_router,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
verify_rib,
create_static_routes,
step,
- topo_daemons,
)
from lib.topogen import Topogen, get_topogen
import os
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
create_interfaces_cfg,
- topo_daemons,
retry,
run_frr_cmd,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
step,
create_route_maps,
verify_prefix_lists,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
create_static_routes,
step,
shutdown_bringup_interface,
- topo_daemons,
)
from lib.bgp import verify_bgp_convergence, create_router_bgp
from lib.topolog import logger
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
create_interfaces_cfg,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
write_test_footer,
reset_config_on_routers,
step,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
create_interfaces_cfg,
- topo_daemons,
scapy_send_raw_packet,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
create_interfaces_cfg,
- topo_daemons,
scapy_send_raw_packet,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
create_interfaces_cfg,
- topo_daemons,
scapy_send_raw_packet,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
shutdown_bringup_interface,
create_prefix_lists,
create_route_maps,
- topo_daemons,
create_interfaces_cfg,
)
from lib.topolog import logger
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
shutdown_bringup_interface,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_topo_from_json, build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
create_static_routes,
step,
shutdown_bringup_interface,
- topo_daemons,
get_frr_ipv6_linklocal,
)
from lib.topolog import logger
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
create_route_maps,
shutdown_bringup_interface,
create_interfaces_cfg,
- topo_daemons,
get_frr_ipv6_linklocal,
)
from lib.topolog import logger
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
write_test_footer,
reset_config_on_routers,
step,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
verify_rib,
create_static_routes,
step,
- topo_daemons,
create_route_maps,
shutdown_bringup_interface,
create_interfaces_cfg,
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
step,
create_route_maps,
verify_prefix_lists,
- topo_daemons,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
step,
shutdown_bringup_interface,
create_interfaces_cfg,
- topo_daemons,
get_frr_ipv6_linklocal,
check_router_status,
create_static_routes,
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)
reset_config_on_routers,
step,
create_interfaces_cfg,
- topo_daemons,
create_debug_log_config,
apply_raw_config,
)
topo = tgen.json_topo
# ... and here it calls Mininet initialization functions.
- # get list of daemons needs to be started for this suite.
- daemons = topo_daemons(tgen, topo)
-
# Starting topology, create tmp files which are loaded to routers
# to start daemons and then start routers
- start_topology(tgen, daemons)
+ start_topology(tgen)
# Creating configuration from JSON
build_config_from_json(tgen, topo)