]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Add an ability to specify daemon params with unified config 17325/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 31 Oct 2024 08:43:28 +0000 (10:43 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 31 Oct 2024 13:55:51 +0000 (13:55 +0000)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 879466731bf36eaf696a29c8d96914443660dd74)

doc/developer/topotests.rst
tests/topotests/lib/topogen.py

index 62097496368789ba000e07fed15e059772f3f0e3..d2308bea94ef4d637b6d39025ae745009ebf0f42 100644 (file)
@@ -1347,9 +1347,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 14dd61b077eba478c73cb6457cda6949919a1a0e..b1da29636530c45f3b195fc29fee429c578b7393 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