diff options
author | Daniil Baturin <daniil@vyos.io> | 2025-06-12 15:20:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-12 15:20:21 +0100 |
commit | dcba87b2394b789c335b44856a8ae7bfea05353c (patch) | |
tree | 3789462504fe665ff59490527d10f5d0fd625b21 /data | |
parent | 71f4f8c55ae660ae39113981a44bd1cd7ef77394 (diff) | |
parent | 05d71332442b244f488792000bf93c96f12c9b46 (diff) | |
download | vyos-1x-dcba87b2394b789c335b44856a8ae7bfea05353c.tar.gz vyos-1x-dcba87b2394b789c335b44856a8ae7bfea05353c.zip |
Merge pull request #4497 from yzguy/T7432
T7432: RPKI VRF Support
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/frr/rpki.frr.j2 | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/data/templates/frr/rpki.frr.j2 b/data/templates/frr/rpki.frr.j2 index edf0ccaa2..e35f99766 100644 --- a/data/templates/frr/rpki.frr.j2 +++ b/data/templates/frr/rpki.frr.j2 @@ -1,8 +1,8 @@ -! +{% macro rpki_config(rpki) %} {# 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() %} +{% if rpki.cache is vyos_defined %} +{% for peer, peer_config in rpki.cache.items() %} {# port is mandatory and preference uses a default value #} {% if peer_config.ssh.username is vyos_defined %} rpki cache ssh {{ peer | replace('_', '-') }} {{ peer_config.port }} {{ peer_config.ssh.username }} {{ peer_config.ssh.private_key_file }} {{ peer_config.ssh.public_key_file }}{{ ' source ' ~ peer_config.source_address if peer_config.source_address is vyos_defined }} preference {{ peer_config.preference }} @@ -11,14 +11,24 @@ rpki {% endif %} {% endfor %} {% endif %} -{% if expire_interval is vyos_defined %} - rpki expire_interval {{ expire_interval }} +{% if rpki.expire_interval is vyos_defined %} + rpki expire_interval {{ rpki.expire_interval }} {% endif %} -{% if polling_period is vyos_defined %} - rpki polling_period {{ polling_period }} +{% if rpki.polling_period is vyos_defined %} + rpki polling_period {{ rpki.polling_period }} {% endif %} -{% if retry_interval is vyos_defined %} - rpki retry_interval {{ retry_interval }} +{% if rpki.retry_interval is vyos_defined %} + rpki retry_interval {{ rpki.retry_interval }} {% endif %} exit +{# j2lint: disable=jinja-statements-delimeter #} +{%- endmacro -%} +! +{% if rpki.vrf is vyos_defined %} +vrf {{ rpki.vrf }} + {{ rpki_config(rpki) | indent(width=1) }} +exit-vrf +{% else %} +{{ rpki_config(rpki) }} +{% endif %} ! |