From a8da54f50df5d60b18a8cdf0ea63c71f82faf14e Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 12 Dec 2024 16:12:43 +0100 Subject: rpki: T6746: FRRender needs to calculate SSH key path --- python/vyos/configdict.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python') diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index fb6365060..cbcbf9f72 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -944,6 +944,11 @@ def get_frrender_dict(conf, argv=None) -> dict: rpki = conf.get_config_dict(rpki_cli_path, key_mangling=('-', '_'), get_first_key=True, with_pki=True, with_recursive_defaults=True) + rpki_ssh_key_base = '/run/frr/id_rpki' + for cache, cache_config in rpki.get('cache',{}).items(): + if 'ssh' in cache_config: + cache_config['ssh']['public_key_file'] = f'{rpki_ssh_key_base}_{cache}.pub' + cache_config['ssh']['private_key_file'] = f'{rpki_ssh_key_base}_{cache}' dict.update({'rpki' : rpki}) elif conf.exists_effective(rpki_cli_path): dict.update({'rpki' : {'deleted' : ''}}) -- cgit v1.2.3