From 8ba3ef37d55fb197dd0706a2ef3b469ca0afa90a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 12 Apr 2022 20:01:14 +0200 Subject: frr: rpki: T4353: add ".j2" file extension on Jinja2 template --- data/templates/frr/rpki.frr.j2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/templates/frr/rpki.frr.j2 (limited to 'data/templates/frr/rpki.frr.j2') 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 +! -- cgit v1.2.3