summaryrefslogtreecommitdiff
path: root/data/templates/frr/vrf.frr.tmpl
blob: 0c87269080b88c195d1fc828a562763914f0d362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% from 'frr/static_routes_macro.j2' import static_routes %}
!
{% if vrf is defined and vrf is not none %}
{%   for vrf_name, vrf_config in vrf.items() %}
vrf {{ vrf_name }}
{%     if vrf_config.static is defined and vrf_config.static is not none %}
{#       IPv4 routes #}
{%       if vrf_config.static.route is defined and vrf_config.static.route is not none %}
{%         for prefix, prefix_config in vrf_config.static.route.items() %}
 {{ static_routes('ip', prefix, prefix_config) }}
{%-        endfor -%}
{%       endif %}
{#       IPv6 routes #}
{%       if vrf_config.static.route6 is defined and vrf_config.static.route6 is not none %}
{%         for prefix, prefix_config in vrf_config.static.route6.items() %}
 {{ static_routes('ipv6', prefix, prefix_config) }}
{%-        endfor -%}
{%       endif %}
{%     endif %}
{%   endfor %}
{% endif %}
!