From 79cbde8095ec3f8f20be63f518b29d47b24101d2 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sun, 11 Aug 2024 12:51:53 +0300 Subject: [PATCH 1/2] tests: Convert self.unified_config to boolean Signed-off-by: Donatas Abraitis --- tests/topotests/lib/topotest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 1d4bc2eac6a5..5a8c2e5964a6 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1430,7 +1430,7 @@ def __init__(self, name, *posargs, **params): self.daemondir = None self.hasmpls = False self.routertype = "frr" - self.unified_config = None + self.unified_config = False self.daemons = { "zebra": 0, "ripd": 0, @@ -1653,7 +1653,7 @@ def loadConf(self, daemon, source=None, param=None): # print "Daemons before:", self.daemons if daemon in self.daemons.keys() or daemon == "frr": if daemon == "frr": - self.unified_config = 1 + self.unified_config = True else: self.daemons[daemon] = 1 if param is not None: From 3901cfea2335f1a1bee493cfad616e8db4ce8340 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sun, 11 Aug 2024 13:47:08 +0300 Subject: [PATCH 2/2] doc: Document on how to run specific daemons with unified config in topotests Signed-off-by: Donatas Abraitis --- doc/developer/topotests.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/developer/topotests.rst b/doc/developer/topotests.rst index 586c0967404a..66946f6c3764 100644 --- a/doc/developer/topotests.rst +++ b/doc/developer/topotests.rst @@ -1332,6 +1332,15 @@ Example: router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf") router.load_config(TopoRouter.RD_OSPF) +or using unified config (specifying which daemons to run is optional): + +.. code:: py + + 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]) - The topology definition or build function