diff options
author | Christian Breunig <christian@breunig.cc> | 2024-12-08 16:33:45 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-12-16 22:24:50 +0100 |
commit | 779f311e7fe81e3c85de28f13e4e12e33b255483 (patch) | |
tree | a7edc34394439a03b019be94cadd1837bcb7f7e0 /src/services | |
parent | 1666e3d99b8de700c880f09ce6ad5ea8bc7f4568 (diff) | |
download | vyos-1x-779f311e7fe81e3c85de28f13e4e12e33b255483.tar.gz vyos-1x-779f311e7fe81e3c85de28f13e4e12e33b255483.zip |
frr: T6746: integrate FRRender class into vyos-configd
When running under vyos-configd only a single apply() is done as last step in
the commit algorithm. FRRender class address is provided via an attribute from
vyos-configd process.
Diffstat (limited to 'src/services')
-rwxr-xr-x | src/services/vyos-configd | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/services/vyos-configd b/src/services/vyos-configd index d977ba2cb..21d91005a 100755 --- a/src/services/vyos-configd +++ b/src/services/vyos-configd @@ -37,6 +37,7 @@ from vyos.configsource import ConfigSourceString from vyos.configsource import ConfigSourceError from vyos.configdiff import get_commit_scripts from vyos.config import Config +from vyos.frrender import FRRender from vyos import ConfigError CFG_GROUP = 'vyattacfg' @@ -209,6 +210,9 @@ def initialization(socket): scripts_called = [] setattr(config, 'scripts_called', scripts_called) + if not hasattr(config, 'frrender_cls'): + setattr(config, 'frrender_cls', FRRender()) + return config @@ -326,5 +330,9 @@ if __name__ == '__main__': if message['last'] and config: scripts_called = getattr(config, 'scripts_called', []) logger.debug(f'scripts_called: {scripts_called}') + + if hasattr(config, 'frrender_cls'): + frrender_cls = getattr(config, 'frrender_cls') + frrender_cls.apply() else: logger.critical(f'Unexpected message: {message}') |