summaryrefslogtreecommitdiff
path: root/data/templates/frr/rpki.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-03 21:41:41 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-03 21:41:41 +0200
commit76abe709cd90b13b2af8d8b5ab8234b417a81c99 (patch)
tree3ce60c44950d22b05a0ec3b0f5b18c05822d3c9f /data/templates/frr/rpki.frr.tmpl
parent807d054d8abb39e2a104115eac047e697356c721 (diff)
downloadvyos-1x-76abe709cd90b13b2af8d8b5ab8234b417a81c99.tar.gz
vyos-1x-76abe709cd90b13b2af8d8b5ab8234b417a81c99.zip
rpki: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/frr/rpki.frr.tmpl')
-rw-r--r--data/templates/frr/rpki.frr.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/frr/rpki.frr.tmpl b/data/templates/frr/rpki.frr.tmpl
index 7f9823f6b..3f4fd3236 100644
--- a/data/templates/frr/rpki.frr.tmpl
+++ b/data/templates/frr/rpki.frr.tmpl
@@ -1,17 +1,17 @@
!
{# as FRR does not support deleting the entire rpki section we leave it in place even when it's empty #}
rpki
-{% if cache is defined and cache is not none %}
+{% 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 is defined and peer_config.ssh.username is defined and peer_config.ssh.username is not none %}
+{% 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 defined and polling_period is not none %}
+{% if polling_period is vyos_defined %}
rpki polling_period {{ polling_period }}
{% endif %}
exit