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/conf_mode/protocols_rip.py | |
| 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/conf_mode/protocols_rip.py')
| -rwxr-xr-x | src/conf_mode/protocols_rip.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/conf_mode/protocols_rip.py b/src/conf_mode/protocols_rip.py index 3862530a2..7eb060504 100755 --- a/src/conf_mode/protocols_rip.py +++ b/src/conf_mode/protocols_rip.py @@ -28,8 +28,6 @@ from vyos import ConfigError from vyos import airbag airbag.enable() -frrender = FRRender() - def get_config(config=None): if config: conf = config @@ -69,11 +67,14 @@ def verify(config_dict): raise ConfigError(f'You can not have "split-horizon poison-reverse" enabled ' \ f'with "split-horizon disable" for "{interface}"!') -def generate(frr_dict): - frrender.generate(frr_dict) +def generate(config_dict): + if 'frrender_cls' not in config_dict: + FRRender().generate(config_dict) + return None -def apply(rip): - frrender.apply() +def apply(config_dict): + if 'frrender_cls' not in config_dict: + FRRender().apply() return None if __name__ == '__main__': |
