diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-12 20:01:14 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-12 20:01:14 +0200 |
commit | 8ba3ef37d55fb197dd0706a2ef3b469ca0afa90a (patch) | |
tree | f1dbd19f0d82872e6ed5ba4cf1e3629fc8666d8a /data/templates/frr/rpki.frr.j2 | |
parent | 0f6da5dc6a769ad303795942277ae2529e44e7d7 (diff) | |
download | vyos-1x-8ba3ef37d55fb197dd0706a2ef3b469ca0afa90a.tar.gz vyos-1x-8ba3ef37d55fb197dd0706a2ef3b469ca0afa90a.zip |
frr: rpki: T4353: add ".j2" file extension on Jinja2 template
Diffstat (limited to 'data/templates/frr/rpki.frr.j2')
-rw-r--r-- | data/templates/frr/rpki.frr.j2 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/data/templates/frr/rpki.frr.j2 b/data/templates/frr/rpki.frr.j2 new file mode 100644 index 000000000..9a549d6de --- /dev/null +++ b/data/templates/frr/rpki.frr.j2 @@ -0,0 +1,18 @@ +! +{# as FRR does not support deleting the entire rpki section we leave it in place even when it's empty #} +rpki +{% if cache is vyos_defined %} +{% for peer, peer_config in cache.items() %} +{# port is mandatory and preference uses a default value #} +{% if peer_config.ssh.username is vyos_defined %} + rpki cache {{ peer | replace('_', '-') }} {{ peer_config.port }} {{ peer_config.ssh.username }} {{ peer_config.ssh.private_key_file }} {{ peer_config.ssh.public_key_file }} {{ peer_config.ssh.known_hosts_file }} preference {{ peer_config.preference }} +{% else %} + rpki cache {{ peer | replace('_', '-') }} {{ peer_config.port }} preference {{ peer_config.preference }} +{% endif %} +{% endfor %} +{% endif %} +{% if polling_period is vyos_defined %} + rpki polling_period {{ polling_period }} +{% endif %} +exit +! |