summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bgp.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-08 16:33:45 +0100
committerChristian Breunig <christian@breunig.cc>2024-12-16 22:24:50 +0100
commit779f311e7fe81e3c85de28f13e4e12e33b255483 (patch)
treea7edc34394439a03b019be94cadd1837bcb7f7e0 /src/conf_mode/protocols_bgp.py
parent1666e3d99b8de700c880f09ce6ad5ea8bc7f4568 (diff)
downloadvyos-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/conf_mode/protocols_bgp.py')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 989cf9b5c..2a4bcbadf 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -35,8 +35,6 @@ from vyos import ConfigError
from vyos import airbag
airbag.enable()
-frrender = FRRender()
-
vrf = None
if len(argv) > 1:
vrf = argv[1]
@@ -558,10 +556,13 @@ def verify(config_dict):
return None
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__':