summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-03 23:13:21 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-03 23:36:04 +0200
commitb55761ba5159933b7cb15ca9eaf7fde247e3ff75 (patch)
tree222443105fad018e20fe4f879327e2df411dbae3 /data/templates
parent5a11647335dc179834c55749b177bd1a47eff32a (diff)
downloadvyos-1x-b55761ba5159933b7cb15ca9eaf7fde247e3ff75.tar.gz
vyos-1x-b55761ba5159933b7cb15ca9eaf7fde247e3ff75.zip
isis: T3693: bugfix Jinja2 template
Commit 472c9568 ("isis: T3693: Adding IPv6 redistribution to ISIS") did not pass rendering, am exception got thrown: jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'protocol' This commit fixes the templateing code.
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/frr/isis.frr.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/frr/isis.frr.tmpl b/data/templates/frr/isis.frr.tmpl
index 3b6432a4f..6cfa076d0 100644
--- a/data/templates/frr/isis.frr.tmpl
+++ b/data/templates/frr/isis.frr.tmpl
@@ -116,10 +116,10 @@ router isis VyOS {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% endfor %}
{% endfor %}
{% endif %}
-{% if redistribute is defined %}
+{% if redistribute is defined %}
{% if redistribute.ipv4 is defined and redistribute.ipv4 is not none %}
{% for protocol, protocol_options in redistribute.ipv4.items() %}
-{% for level, level_config in redistribute.ipv4.protocol.items() %}
+{% for level, level_config in protocol_options.items() %}
{% if level_config.metric is defined and level_config.metric is not none %}
redistribute ipv4 {{ protocol }} {{ level | replace('_', '-') }} metric {{ level_config.metric }}
{% elif level_config.route_map is defined and level_config.route_map is not none %}
@@ -132,7 +132,7 @@ router isis VyOS {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% endif %}
{% if redistribute.ipv6 is defined and redistribute.ipv6 is not none %}
{% for protocol, protocol_options in redistribute.ipv6.items() %}
-{% for level, level_config in redistribute.ipv6.protocol.items() %}
+{% for level, level_config in protocol_options.items() %}
{% if level_config.metric is defined and level_config.metric is not none %}
redistribute ipv6 {{ protocol }} {{ level | replace('_', '-') }} metric {{ level_config.metric }}
{% elif level_config.route_map is defined and level_config.route_map is not none %}