diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-11-01 09:03:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-01 09:03:27 -0500 |
| commit | 02f4fef5ffd88923c63f219b9a118221ea800d80 (patch) | |
| tree | 25dbdc891ba24b990e26447d11a420e9a4bdf17c | |
| parent | 6fbc39904b9e98f6eeda397b5af05866e8fa0ea0 (diff) | |
| parent | 9474e8677e5cf6511a75047f3797a467933a44b1 (diff) | |
Merge pull request #17325 from FRRouting/mergify/bp/dev/10.2/pr-17317
tests: Add an ability to specify daemon params with unified config (backport #17317)
| -rw-r--r-- | doc/developer/topotests.rst | 6 | ||||
| -rw-r--r-- | tests/topotests/lib/topogen.py | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/developer/topotests.rst b/doc/developer/topotests.rst index 6209749636..d2308bea94 100644 --- a/doc/developer/topotests.rst +++ b/doc/developer/topotests.rst @@ -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 diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 14dd61b077..b1da296365 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -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 |
