]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Add an ability to specify daemon params with unified config 17317/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 31 Oct 2024 08:43:28 +0000 (10:43 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 31 Oct 2024 08:43:28 +0000 (10:43 +0200)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
doc/developer/topotests.rst
tests/topotests/lib/topogen.py

index 884c05af82ca608082cdb793a5b9e6eb8974c40e..5077745a1563807fbcb72aed602a1c81e796c2ba 100644 (file)
@@ -1349,9 +1349,9 @@ or using unified config (specifying which daemons to run is optional):
 
       for _, (rname, router) in enumerate(router_list.items(), 1):
          router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)), [
-            TopoRouter.RD_ZEBRA
-            TopoRouter.RD_MGMTD,
-            TopoRouter.RD_BGP])
+            (TopoRouter.RD_ZEBRA, "-s 90000000"),
+            (TopoRouter.RD_MGMTD, None),
+            (TopoRouter.RD_BGP, None)]
 
 - The topology definition or build function
 
index 641295258e333d6e36a86172a444073eeea00c11..d04d7b4257ea2e985eb7a42fb4a2db0c9b874d16 100644 (file)
@@ -833,6 +833,8 @@ class TopoRouter(TopoGear):
         Loads the unified configuration file source
         Start the daemons in the list
         If daemons is None, try to infer daemons from the config file
+        `daemons` is a tuple (daemon, param) of daemons to start, e.g.:
+        (TopoRouter.RD_ZEBRA, "-s 90000000").
         """
         source_path = self.load_config(self.RD_FRR, source)
         if not daemons:
@@ -849,8 +851,9 @@ class TopoRouter(TopoGear):
                 if result:
                     self.load_config(daemon, "")
         else:
-            for daemon in daemons:
-                self.load_config(daemon, "")
+            for item in daemons:
+                daemon, param = item
+                self.load_config(daemon, "", param)
 
     def load_config(self, daemon, source=None, param=None):
         """Loads daemon configuration from the specified source