summaryrefslogtreecommitdiff
path: root/data/templates/vrf
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-16 10:53:32 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-16 10:54:39 +0100
commit5da31c186c1c8defbe82ee2e8bba53c15c0cd655 (patch)
tree63b6a38d6a5e6cc25083c242112a94ef7d01ff85 /data/templates/vrf
parenta737889d015ebda7d4b75be67d877fbf181631ea (diff)
downloadvyos-1x-5da31c186c1c8defbe82ee2e8bba53c15c0cd655.tar.gz
vyos-1x-5da31c186c1c8defbe82ee2e8bba53c15c0cd655.zip
vrf: T31: migrate to get_config_dict()
(cherry picked from commit e1b2f1012ca18ef4ecf2b53e9bb01a50880cbd3c)
Diffstat (limited to 'data/templates/vrf')
-rw-r--r--data/templates/vrf/vrf.conf.tmpl9
1 files changed, 5 insertions, 4 deletions
diff --git a/data/templates/vrf/vrf.conf.tmpl b/data/templates/vrf/vrf.conf.tmpl
index 6d01d2b89..29c0ba08d 100644
--- a/data/templates/vrf/vrf.conf.tmpl
+++ b/data/templates/vrf/vrf.conf.tmpl
@@ -1,8 +1,9 @@
### Autogenerated by vrf.py ###
#
# Routing table ID to name mapping reference
-
# id vrf name comment
-{% for vrf in vrf_add %}
-{{ "%-10s" | format(vrf.table) }} {{ "%-16s" | format(vrf.name) }} # {{ vrf.description }}
-{% endfor %}
+{% if name is defined and name is not none %}
+{% for vrf, vrf_config in name.items() %}
+{{ "%-10s" | format(vrf_config.table) }} {{ "%-16s" | format(vrf) }} {{ '# ' + vrf_config.description if vrf_config.description is defined and vrf_config.description is not none }}
+{% endfor %}
+{% endif %}