diff options
| author | bl0way <william.blonay@gmail.com> | 2025-10-24 13:19:16 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2025-10-29 08:15:28 +0100 |
| commit | b0ffe03b917c894f684876facaacb48cdbdba690 (patch) | |
| tree | 0ee905a2c96a3035808ac7ed00b7e15e38ec7c2f /python | |
| parent | 761968da584199e74a23d6381b3f6b400906083f (diff) | |
| download | vyos-1x-b0ffe03b917c894f684876facaacb48cdbdba690.tar.gz vyos-1x-b0ffe03b917c894f684876facaacb48cdbdba690.zip | |
frr: T7896: Configure frr profile with 'system frr profile' command
Co-authored-by: Christian Breunig <christian@breunig.cc>
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' |
