From 779f311e7fe81e3c85de28f13e4e12e33b255483 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 8 Dec 2024 16:33:45 +0100 Subject: 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. --- src/conf_mode/policy.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/conf_mode/policy.py') diff --git a/src/conf_mode/policy.py b/src/conf_mode/policy.py index e6b6d474a..2122cb032 100755 --- a/src/conf_mode/policy.py +++ b/src/conf_mode/policy.py @@ -26,8 +26,6 @@ from vyos import ConfigError from vyos import airbag airbag.enable() -frrender = FRRender() - def community_action_compatibility(actions: dict) -> bool: """ Check compatibility of values in community and large community sections @@ -264,10 +262,13 @@ def verify(config_dict): def generate(config_dict): - frrender.generate(config_dict) + if 'frrender_cls' not in config_dict: + FRRender().generate(config_dict) + return None def apply(config_dict): - frrender.apply() + if 'frrender_cls' not in config_dict: + FRRender().apply() return None if __name__ == '__main__': -- cgit v1.2.3