diff options
Diffstat (limited to 'tests/topotests/lib/topogen.py')
| -rw-r--r-- | tests/topotests/lib/topogen.py | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index f49e30ea5f..8b01b9b317 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -824,6 +824,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: @@ -832,16 +834,17 @@ class TopoRouter(TopoGear):              for daemon in self.RD:                  # This will not work for all daemons                  daemonstr = self.RD.get(daemon).rstrip("d") -                if daemonstr == "pim": -                    grep_cmd = "grep 'ip {}' {}".format(daemonstr, source_path) +                if daemonstr == "path": +                    grep_cmd = "grep 'candidate-path' {}".format(source_path)                  else: -                    grep_cmd = "grep 'router {}' {}".format(daemonstr, source_path) +                    grep_cmd = "grep -w '{}' {}".format(daemonstr, source_path)                  result = self.run(grep_cmd, warn=False).strip()                  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  | 
