diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-11 20:00:14 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-11 20:00:14 +0100 |
commit | 66282cc8a5c8ced4dee8414e5fcb5cbaa457781f (patch) | |
tree | 1c801d92ac2d0e7ac63cb03d83117eb6510a45ed /data/templates/frr/rip_ripng.frr.j2 | |
parent | bd3ed52d07929c644ca5c5180689f503c349b5ba (diff) | |
download | vyos-1x-66282cc8a5c8ced4dee8414e5fcb5cbaa457781f.tar.gz vyos-1x-66282cc8a5c8ced4dee8414e5fcb5cbaa457781f.zip |
ripng: T3281: move common parts into Jinja2 include
Diffstat (limited to 'data/templates/frr/rip_ripng.frr.j2')
-rw-r--r-- | data/templates/frr/rip_ripng.frr.j2 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/data/templates/frr/rip_ripng.frr.j2 b/data/templates/frr/rip_ripng.frr.j2 new file mode 100644 index 000000000..de180ee6b --- /dev/null +++ b/data/templates/frr/rip_ripng.frr.j2 @@ -0,0 +1,36 @@ +{% if default_information is defined and default_information.originate is defined %} + default-information originate +{% endif %} +{% if default_metric is defined and default_metric is not none %} + default-metric {{ default_metric }} +{% endif %} +{% if passive_interface is defined and passive_interface is not none %} +{% for interface in passive_interface %} + passive-interface {{ interface }} +{% endfor %} +{% endif %} +{% if network is defined and network is not none %} +{% for prefix in network %} + network {{ prefix }} +{% endfor %} +{% endif %} +{% if interface is defined and interface is not none %} +{% for ifname in interface %} + network {{ ifname }} +{% endfor %} +{% endif %} +{% if route is defined and route is not none %} +{% for prefix in route %} + route {{ prefix }} +{% endfor %} +{% endif %} +{# timers have default values #} + timers basic {{ timers['update'] }} {{ timers.timeout }} {{ timers.garbage_collection }} +{% if redistribute is defined and redistribute is not none %} +{% for protocol, protocol_config in redistribute.items() %} +{% if protocol == 'ospfv3' %} +{% set protocol = 'ospf6' %} +{% endif %} + redistribute {{ protocol }} {{ 'metric ' + protocol_config.metric if protocol_config.metric is defined }} {{ 'route-map ' + protocol_config.route_map if protocol_config.route_map is defined }} +{% endfor %} +{% endif %} |