summaryrefslogtreecommitdiff
path: root/data/templates/frr/rpki.frr.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/frr/rpki.frr.j2')
-rw-r--r--data/templates/frr/rpki.frr.j224
1 files changed, 24 insertions, 0 deletions
diff --git a/data/templates/frr/rpki.frr.j2 b/data/templates/frr/rpki.frr.j2
new file mode 100644
index 0000000..5972410
--- /dev/null
+++ b/data/templates/frr/rpki.frr.j2
@@ -0,0 +1,24 @@
+!
+{# 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 }} preference {{ peer_config.preference }}
+{% else %}
+ rpki cache {{ peer | replace('_', '-') }} {{ peer_config.port }} preference {{ peer_config.preference }}
+{% endif %}
+{% endfor %}
+{% endif %}
+{% if expire_interval is vyos_defined %}
+ rpki expire_interval {{ expire_interval }}
+{% endif %}
+{% if polling_period is vyos_defined %}
+ rpki polling_period {{ polling_period }}
+{% endif %}
+{% if retry_interval is vyos_defined %}
+ rpki retry_interval {{ retry_interval }}
+{% endif %}
+exit
+!