diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-04-13 15:07:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 15:07:50 +0100 |
commit | 0439599a8e31ee1a4252a2c38bb512f414388870 (patch) | |
tree | 74fdaf45958ca6cd209a4aa3c45bc5b5bc307127 /src/conf_mode/protocols_ospf.py | |
parent | 78d846824df05682f63c2dc7d894aa501ed9f63f (diff) | |
parent | 7d642a2862dcd0c7c2f80ac42ea9427970804d06 (diff) | |
download | vyos-1x-0439599a8e31ee1a4252a2c38bb512f414388870.tar.gz vyos-1x-0439599a8e31ee1a4252a2c38bb512f414388870.zip |
Merge pull request #1943 from c-po/t5150-frr
T5150: implementation of new Kernel/Zebra route-map support
Diffstat (limited to 'src/conf_mode/protocols_ospf.py')
-rwxr-xr-x | src/conf_mode/protocols_ospf.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index eb64afa0c..fbb876123 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -256,25 +256,15 @@ def generate(ospf): if not ospf or 'deleted' in ospf: return None - ospf['protocol'] = 'ospf' # required for frr/vrf.route-map.frr.j2 - ospf['frr_zebra_config'] = render_to_string('frr/vrf.route-map.frr.j2', ospf) ospf['frr_ospfd_config'] = render_to_string('frr/ospfd.frr.j2', ospf) return None def apply(ospf): ospf_daemon = 'ospfd' - zebra_daemon = 'zebra' # Save original configuration prior to starting any commit actions frr_cfg = frr.FRRConfig() - # The route-map used for the FIB (zebra) is part of the zebra daemon - frr_cfg.load_configuration(zebra_daemon) - frr_cfg.modify_section('(\s+)?ip protocol ospf route-map [-a-zA-Z0-9.]+', stop_pattern='(\s|!)') - if 'frr_zebra_config' in ospf: - frr_cfg.add_before(frr.default_add_before, ospf['frr_zebra_config']) - frr_cfg.commit_configuration(zebra_daemon) - # Generate empty helper string which can be ammended to FRR commands, it # will be either empty (default VRF) or contain the "vrf <name" statement vrf = '' @@ -292,6 +282,7 @@ def apply(ospf): if 'frr_ospfd_config' in ospf: frr_cfg.add_before(frr.default_add_before, ospf['frr_ospfd_config']) + frr_cfg.commit_configuration(ospf_daemon) return None |