From b0ffe03b917c894f684876facaacb48cdbdba690 Mon Sep 17 00:00:00 2001 From: bl0way Date: Fri, 24 Oct 2025 13:19:16 +0200 Subject: frr: T7896: Configure frr profile with 'system frr profile' command Co-authored-by: Christian Breunig --- python/vyos/frrender.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'python') 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' -- cgit v1.2.3