Merge pull request #10798 from Jafaral/topo-detect-pim

topotest: enable pim when detecting `ip pim` using unified config
This commit is contained in:
Donald Sharp 2022-03-16 10:28:56 -04:00 committed by GitHub
commit 79f4d05c7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -804,9 +804,11 @@ class TopoRouter(TopoGear):
for daemon in self.RD:
# This will not work for all daemons
daemonstr = self.RD.get(daemon).rstrip("d")
result = self.run(
"grep 'router {}' {}".format(daemonstr, source)
).strip()
if daemonstr == "pim":
grep_cmd = "grep 'ip {}' {}".format(daemonstr, source)
else:
grep_cmd = "grep 'router {}' {}".format(daemonstr, source)
result = self.run(grep_cmd).strip()
if result:
self.load_config(daemon)
else: