diff options
| author | Christian Breunig <christian@breunig.cc> | 2025-10-29 08:46:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-29 08:46:37 +0100 |
| commit | 0046b24ad9def8b0672606795e70b7927ea79dc4 (patch) | |
| tree | b59595d3f8111f97f85e5ecb125c2aa2281305de /python | |
| parent | 7e4715447564ec3a8c522ae3e4647a3474b182ed (diff) | |
| parent | c23c277d0fe3e08d1fece3e938b32406b7b976d7 (diff) | |
| download | vyos-1x-0046b24ad9def8b0672606795e70b7927ea79dc4.tar.gz vyos-1x-0046b24ad9def8b0672606795e70b7927ea79dc4.zip | |
Merge pull request #4810 from bl0way/T7896-frr-profile
T7896: Add frr profile selection
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/frrender.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index 91fd3667d..54456a598 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -233,6 +233,12 @@ def get_frrender_dict(conf: Config, argv=None) -> dict: ip_dict['afi'] = ip_version dict.update({ip_version : ip_dict}) + # Get FRR profile + frr_system_cli_path = ['system', 'frr'] + dict['system_frr'] = conf.get_config_dict(frr_system_cli_path, key_mangling=('-', '_'), + get_first_key=True, + with_recursive_defaults=True) + # Enable SNMP agentx support # SNMP AgentX support cannot be disabled once enabled if conf.exists(['service', 'snmp']): @@ -733,6 +739,11 @@ class FRRender: # we can not reload an empty file, thus we always embed the marker output = '!\n' + # FRR profile configuration + tmp = dict_search('system_frr.profile', config_dict) + if tmp: + output += f'frr defaults {tmp}\n' + # Enable FRR logging output += 'log facility daemon\n' output += 'log timestamp precision 3\n' |
