summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-12 16:12:43 +0100
committerChristian Breunig <christian@breunig.cc>2024-12-16 22:24:50 +0100
commita8da54f50df5d60b18a8cdf0ea63c71f82faf14e (patch)
tree145b62b0c6836ac67cb20325a9b099056d6ae90c /python
parent76b74d62b607961f08bd0284a9dbc5427ba48e1d (diff)
downloadvyos-1x-a8da54f50df5d60b18a8cdf0ea63c71f82faf14e.tar.gz
vyos-1x-a8da54f50df5d60b18a8cdf0ea63c71f82faf14e.zip
rpki: T6746: FRRender needs to calculate SSH key path
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configdict.py5
1 files changed, 5 insertions, 0 deletions
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' : ''}})