summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-03 21:42:37 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-03 21:42:37 +0200
commitf2a5b57223c607dea615cc09f9cb24e0910c8a08 (patch)
tree114d904d473614000f8f4cad88bbea71f15b6b32
parent76abe709cd90b13b2af8d8b5ab8234b417a81c99 (diff)
downloadvyos-1x-f2a5b57223c607dea615cc09f9cb24e0910c8a08.tar.gz
vyos-1x-f2a5b57223c607dea615cc09f9cb24e0910c8a08.zip
vrf/vni: T4333: migrate to new vyos_defined Jinja2 test
-rw-r--r--data/templates/frr/vrf-vni.frr.tmpl4
-rw-r--r--data/templates/frr/vrf.route-map.frr.tmpl4
2 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/frr/vrf-vni.frr.tmpl b/data/templates/frr/vrf-vni.frr.tmpl
index 299c9719e..916b5d05d 100644
--- a/data/templates/frr/vrf-vni.frr.tmpl
+++ b/data/templates/frr/vrf-vni.frr.tmpl
@@ -1,7 +1,7 @@
-{% if name is defined and name is not none %}
+{% if name is vyos_defined %}
{% for vrf, vrf_config in name.items() %}
vrf {{ vrf }}
-{% if vrf_config.vni is defined and vrf_config.vni is not none %}
+{% if vrf_config.vni is vyos_defined %}
vni {{ vrf_config.vni }}
{% endif %}
exit-vrf
diff --git a/data/templates/frr/vrf.route-map.frr.tmpl b/data/templates/frr/vrf.route-map.frr.tmpl
index cb0e07616..5e0c56a7b 100644
--- a/data/templates/frr/vrf.route-map.frr.tmpl
+++ b/data/templates/frr/vrf.route-map.frr.tmpl
@@ -1,10 +1,10 @@
!
-{% if vrf is defined and vrf is not none and route_map is defined and route_map is not none %}
+{% if vrf is vyos_defined and route_map is vyos_defined %}
vrf {{ vrf }}
ip protocol {{ protocol }} route-map {{ route_map }}
exit-vrf
!
-{% elif route_map is defined and route_map is not none %}
+{% elif route_map is vyos_defined %}
ip protocol {{ protocol }} route-map {{ route_map }}
{% endif %}
!