mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-25 20:38:34 +00:00
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)
This commit is contained in:
commit
02f4fef5ff
@ -1347,9 +1347,9 @@ or using unified config (specifying which daemons to run is optional):
|
|||||||
|
|
||||||
for _, (rname, router) in enumerate(router_list.items(), 1):
|
for _, (rname, router) in enumerate(router_list.items(), 1):
|
||||||
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)), [
|
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)), [
|
||||||
TopoRouter.RD_ZEBRA
|
(TopoRouter.RD_ZEBRA, "-s 90000000"),
|
||||||
TopoRouter.RD_MGMTD,
|
(TopoRouter.RD_MGMTD, None),
|
||||||
TopoRouter.RD_BGP])
|
(TopoRouter.RD_BGP, None)]
|
||||||
|
|
||||||
- The topology definition or build function
|
- The topology definition or build function
|
||||||
|
|
||||||
|
@ -833,6 +833,8 @@ class TopoRouter(TopoGear):
|
|||||||
Loads the unified configuration file source
|
Loads the unified configuration file source
|
||||||
Start the daemons in the list
|
Start the daemons in the list
|
||||||
If daemons is None, try to infer daemons from the config file
|
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)
|
source_path = self.load_config(self.RD_FRR, source)
|
||||||
if not daemons:
|
if not daemons:
|
||||||
@ -849,8 +851,9 @@ class TopoRouter(TopoGear):
|
|||||||
if result:
|
if result:
|
||||||
self.load_config(daemon, "")
|
self.load_config(daemon, "")
|
||||||
else:
|
else:
|
||||||
for daemon in daemons:
|
for item in daemons:
|
||||||
self.load_config(daemon, "")
|
daemon, param = item
|
||||||
|
self.load_config(daemon, "", param)
|
||||||
|
|
||||||
def load_config(self, daemon, source=None, param=None):
|
def load_config(self, daemon, source=None, param=None):
|
||||||
"""Loads daemon configuration from the specified source
|
"""Loads daemon configuration from the specified source
|
||||||
|
Loading…
Reference in New Issue
Block a user