Skip to content

Commit

Permalink
topotato: fix routers = parametric
Browse files Browse the repository at this point in the history
Accidentally lost this during the `FRRParams` refactor.

Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Sep 6, 2024
1 parent b383fb1 commit 037298f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion topotato/frr/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,13 @@ def __init_subclass__(cls, /, **kwargs):
cls.templates = {}
cls.daemon_rtrs = {}

all_routers = getattr(cls, "routers", None)

for daemon in FRRSetup.daemons_all:
if not hasattr(cls, daemon):
continue

cls.templates[daemon] = jenv.compile_class_attr(cls, daemon)
cls.daemon_rtrs[daemon] = getattr(cls, "%s_routers" % daemon, None)
cls.daemon_rtrs[daemon] = getattr(cls, "%s_routers" % daemon, all_routers)

return cls

0 comments on commit 037298f

Please sign in to comment.