diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-11 20:56:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-11 20:56:45 +0200 |
commit | 47838b888aa3e7378ca0270a774cb77635b7f092 (patch) | |
tree | 818b93f0503831e16d692d2178e5345935fc3296 /data/templates/accel-ppp/config_chap_secrets_radius.j2 | |
parent | 5f164e59aac8ce7b8eba50d3906da87a3bb7a9da (diff) | |
download | vyos-1x-47838b888aa3e7378ca0270a774cb77635b7f092.tar.gz vyos-1x-47838b888aa3e7378ca0270a774cb77635b7f092.zip |
accel-ppp: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/accel-ppp/config_chap_secrets_radius.j2')
-rw-r--r-- | data/templates/accel-ppp/config_chap_secrets_radius.j2 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/data/templates/accel-ppp/config_chap_secrets_radius.j2 b/data/templates/accel-ppp/config_chap_secrets_radius.j2 index 49af3a228..1b28dbe46 100644 --- a/data/templates/accel-ppp/config_chap_secrets_radius.j2 +++ b/data/templates/accel-ppp/config_chap_secrets_radius.j2 @@ -1,33 +1,33 @@ -{% if authentication.mode is defined and authentication.mode == 'local' %} +{% if authentication.mode is vyos_defined('local') %} [chap-secrets] chap-secrets={{ chap_secrets_file }} -{% elif authentication.mode is defined and authentication.mode == 'radius' %} +{% elif authentication.mode is vyos_defined('radius') %} [radius] verbose=1 -{% for server, options in authentication.radius.server.items() if not options.disable is defined %} +{% for server, options in authentication.radius.server.items() if not options.disable is vyos_defined %} server={{ server }},{{ options.key }},auth-port={{ options.port }},acct-port={{ options.acct_port }},req-limit=0,fail-time={{ options.fail_time }} {% endfor %} -{% if authentication.radius.acct_interim_jitter is defined and authentication.radius.acct_interim_jitter is not none %} +{% if authentication.radius.acct_interim_jitter is vyos_defined %} acct-interim-jitter={{ authentication.radius.acct_interim_jitter }} {% endif %} acct-timeout={{ authentication.radius.acct_timeout }} timeout={{ authentication.radius.timeout }} max-try={{ authentication.radius.max_try }} -{% if authentication.radius.nas_identifier is defined and authentication.radius.nas_identifier is not none %} +{% if authentication.radius.nas_identifier is vyos_defined %} nas-identifier={{ authentication.radius.nas_identifier }} {% endif %} -{% if authentication.radius.nas_ip_address is defined and authentication.radius.nas_ip_address is not none %} +{% if authentication.radius.nas_ip_address is vyos_defined %} nas-ip-address={{ authentication.radius.nas_ip_address }} {% endif %} -{% if authentication.radius.source_address is defined and authentication.radius.source_address is not none %} +{% if authentication.radius.source_address is vyos_defined %} bind={{ authentication.radius.source_address }} {% endif %} -{% if authentication.radius.dynamic_author.server is defined and authentication.radius.dynamic_author.server is not none %} +{% if authentication.radius.dynamic_author.server is vyos_defined %} dae-server={{ authentication.radius.dynamic_author.server }}:{{ authentication.radius.dynamic_author.port }},{{ authentication.radius.dynamic_author.key }} {% endif %} {% endif %} {# Both chap-secrets and radius block required the gw-ip-address #} -{% if gateway_address is defined and gateway_address is not none %} +{% if gateway_address is vyos_defined %} gw-ip-address={{ gateway_address }} {% endif %} |