summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-11 20:58:13 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-11 20:58:13 +0200
commitb42ad4bf72915289ccb464942a94f35c34b12d37 (patch)
treef344e80b48cc7b6b14fcb500f2275465ff8732b4
parent7c493522417b99d6937715408f1d6821c5a04918 (diff)
downloadvyos-1x-b42ad4bf72915289ccb464942a94f35c34b12d37.tar.gz
vyos-1x-b42ad4bf72915289ccb464942a94f35c34b12d37.zip
router-advert: T4333: migrate to new vyos_defined Jinja2 test
-rw-r--r--data/templates/router-advert/radvd.conf.tmpl42
1 files changed, 21 insertions, 21 deletions
diff --git a/data/templates/router-advert/radvd.conf.tmpl b/data/templates/router-advert/radvd.conf.tmpl
index 88d066491..b40ba1ee0 100644
--- a/data/templates/router-advert/radvd.conf.tmpl
+++ b/data/templates/router-advert/radvd.conf.tmpl
@@ -1,63 +1,63 @@
### Autogenerated by service_router-advert.py ###
-{% if interface is defined and interface is not none %}
+{% if interface is vyos_defined %}
{% for iface, iface_config in interface.items() %}
interface {{ iface }} {
IgnoreIfMissing on;
-{% if iface_config.default_preference is defined and iface_config.default_preference is not none %}
+{% if iface_config.default_preference is vyos_defined %}
AdvDefaultPreference {{ iface_config.default_preference }};
{% endif %}
-{% if iface_config.managed_flag is defined and iface_config.managed_flag is not none %}
- AdvManagedFlag {{ 'on' if iface_config.managed_flag is defined else 'off' }};
+{% if iface_config.managed_flag is vyos_defined %}
+ AdvManagedFlag {{ 'on' if iface_config.managed_flag is vyos_defined else 'off' }};
{% endif %}
-{% if iface_config.interval.max is defined and iface_config.interval.max is not none %}
+{% if iface_config.interval.max is vyos_defined %}
MaxRtrAdvInterval {{ iface_config.interval.max }};
{% endif %}
-{% if iface_config.interval.min is defined and iface_config.interval.min is not none %}
+{% if iface_config.interval.min is vyos_defined %}
MinRtrAdvInterval {{ iface_config.interval.min }};
{% endif %}
-{% if iface_config.reachable_time is defined and iface_config.reachable_time is not none %}
+{% if iface_config.reachable_time is vyos_defined %}
AdvReachableTime {{ iface_config.reachable_time }};
{% endif %}
- AdvIntervalOpt {{ 'off' if iface_config.no_send_advert is defined else 'on' }};
- AdvSendAdvert {{ 'off' if iface_config.no_send_advert is defined else 'on' }};
-{% if iface_config.default_lifetime is defined %}
+ AdvIntervalOpt {{ 'off' if iface_config.no_send_advert is vyos_defined else 'on' }};
+ AdvSendAdvert {{ 'off' if iface_config.no_send_advert is vyos_defined else 'on' }};
+{% if iface_config.default_lifetime is vyos_defined %}
AdvDefaultLifetime {{ iface_config.default_lifetime }};
{% endif %}
-{% if iface_config.link_mtu is defined %}
+{% if iface_config.link_mtu is vyos_defined %}
AdvLinkMTU {{ iface_config.link_mtu }};
{% endif %}
- AdvOtherConfigFlag {{ 'on' if iface_config.other_config_flag is defined else 'off' }};
+ AdvOtherConfigFlag {{ 'on' if iface_config.other_config_flag is vyos_defined else 'off' }};
AdvRetransTimer {{ iface_config.retrans_timer }};
AdvCurHopLimit {{ iface_config.hop_limit }};
-{% if iface_config.route is defined %}
+{% if iface_config.route is vyos_defined %}
{% for route, route_options in iface_config.route.items() %}
route {{ route }} {
-{% if route_options.valid_lifetime is defined %}
+{% if route_options.valid_lifetime is vyos_defined %}
AdvRouteLifetime {{ route_options.valid_lifetime }};
{% endif %}
-{% if route_options.route_preference is defined %}
+{% if route_options.route_preference is vyos_defined %}
AdvRoutePreference {{ route_options.route_preference }};
{% endif %}
- RemoveRoute {{ 'off' if route_options.no_remove_route is defined else 'on' }};
+ RemoveRoute {{ 'off' if route_options.no_remove_route is vyos_defined else 'on' }};
};
{% endfor %}
{% endif %}
-{% if iface_config.prefix is defined and iface_config.prefix is not none %}
+{% if iface_config.prefix is vyos_defined %}
{% for prefix, prefix_options in iface_config.prefix.items() %}
prefix {{ prefix }} {
- AdvAutonomous {{ 'off' if prefix_options.no_autonomous_flag is defined else 'on' }};
+ AdvAutonomous {{ 'off' if prefix_options.no_autonomous_flag is vyos_defined else 'on' }};
AdvValidLifetime {{ prefix_options.valid_lifetime }};
- AdvOnLink {{ 'off' if prefix_options.no_on_link_flag is defined else 'on' }};
+ AdvOnLink {{ 'off' if prefix_options.no_on_link_flag is vyos_defined else 'on' }};
AdvPreferredLifetime {{ prefix_options.preferred_lifetime }};
};
{% endfor %}
{% endif %}
-{% if iface_config.name_server is defined %}
+{% if iface_config.name_server is vyos_defined %}
RDNSS {{ iface_config.name_server | join(" ") }} {
};
{% endif %}
-{% if iface_config.dnssl is defined %}
+{% if iface_config.dnssl is vyos_defined %}
DNSSL {{ iface_config.dnssl | join(" ") }} {
};
{% endif %}