summaryrefslogtreecommitdiffstats
path: root/tests/topotests/bgp_update_delay
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2021-07-29 11:38:55 +0200
committerChristian Hopps <chopps@labn.net>2021-09-04 15:04:46 +0200
commite82b531df94b9fd7bc456df8a1b7c58f2770eff9 (patch)
treec5b8812d719c905bec58db38a2f0800be675c0e5 /tests/topotests/bgp_update_delay
parenttests: fix pylint test errors (diff)
downloadfrr-e82b531df94b9fd7bc456df8a1b7c58f2770eff9.tar.xz
frr-e82b531df94b9fd7bc456df8a1b7c58f2770eff9.zip
tests: remove legacy Topo class (fixes many pylint errors)
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests/topotests/bgp_update_delay')
-rw-r--r--tests/topotests/bgp_update_delay/test_bgp_update_delay.py36
1 files changed, 17 insertions, 19 deletions
diff --git a/tests/topotests/bgp_update_delay/test_bgp_update_delay.py b/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
index a936d44d1..31a887b6c 100644
--- a/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
+++ b/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
@@ -76,32 +76,30 @@ from lib.micronet_compat import Topo
pytestmark = [pytest.mark.bgpd]
-class TemplateTopo(Topo):
- def build(self, *_args, **_opts):
- tgen = get_topogen(self)
-
- for routern in range(1, 6):
- tgen.add_router("r{}".format(routern))
+CWD = os.path.dirname(os.path.realpath(__file__))
+def build_topo(tgen):
+ for routern in range(1, 6):
+ tgen.add_router("r{}".format(routern))
- switch = tgen.add_switch("s1")
- switch.add_link(tgen.gears["r1"])
- switch.add_link(tgen.gears["r2"])
+ switch = tgen.add_switch("s1")
+ switch.add_link(tgen.gears["r1"])
+ switch.add_link(tgen.gears["r2"])
- switch = tgen.add_switch("s2")
- switch.add_link(tgen.gears["r2"])
- switch.add_link(tgen.gears["r3"])
+ switch = tgen.add_switch("s2")
+ switch.add_link(tgen.gears["r2"])
+ switch.add_link(tgen.gears["r3"])
- switch = tgen.add_switch("s3")
- switch.add_link(tgen.gears["r2"])
- switch.add_link(tgen.gears["r4"])
+ switch = tgen.add_switch("s3")
+ switch.add_link(tgen.gears["r2"])
+ switch.add_link(tgen.gears["r4"])
- switch = tgen.add_switch("s4")
- switch.add_link(tgen.gears["r2"])
- switch.add_link(tgen.gears["r5"])
+ switch = tgen.add_switch("s4")
+ switch.add_link(tgen.gears["r2"])
+ switch.add_link(tgen.gears["r5"])
def setup_module(mod):
- tgen = Topogen(TemplateTopo, mod.__name__)
+ tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
router_list = tgen.routers()