summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-10 09:26:56 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-11 21:22:07 +0200
commitf1b031589e6c58296cdf73b975c71b10c407bdb3 (patch)
treeaea66328fffbdd9c22d39bddf0fb16248100beb0 /data/templates/accel-ppp
parent02f2700d4e3742bacf534c5bd6c4118c66a18aff (diff)
downloadvyos-1x-f1b031589e6c58296cdf73b975c71b10c407bdb3.tar.gz
vyos-1x-f1b031589e6c58296cdf73b975c71b10c407bdb3.zip
T4353: enable linting of Jinja2 templates
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r--data/templates/accel-ppp/config_chap_secrets_radius.j224
-rw-r--r--data/templates/accel-ppp/config_ip_pool.j216
-rw-r--r--data/templates/accel-ppp/config_ipv6_pool.j218
-rw-r--r--data/templates/accel-ppp/config_modules_auth_protocols.j28
-rw-r--r--data/templates/accel-ppp/config_name_server.j28
-rw-r--r--data/templates/accel-ppp/config_shaper_radius.j26
6 files changed, 40 insertions, 40 deletions
diff --git a/data/templates/accel-ppp/config_chap_secrets_radius.j2 b/data/templates/accel-ppp/config_chap_secrets_radius.j2
index 1b28dbe46..bb820497b 100644
--- a/data/templates/accel-ppp/config_chap_secrets_radius.j2
+++ b/data/templates/accel-ppp/config_chap_secrets_radius.j2
@@ -4,27 +4,27 @@ chap-secrets={{ chap_secrets_file }}
{% elif authentication.mode is vyos_defined('radius') %}
[radius]
verbose=1
-{% for server, options in authentication.radius.server.items() if not options.disable is vyos_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 vyos_defined %}
+{% endfor %}
+{% if authentication.radius.acct_interim_jitter is vyos_defined %}
acct-interim-jitter={{ authentication.radius.acct_interim_jitter }}
-{% endif %}
+{% endif %}
acct-timeout={{ authentication.radius.acct_timeout }}
timeout={{ authentication.radius.timeout }}
max-try={{ authentication.radius.max_try }}
-{% if authentication.radius.nas_identifier is vyos_defined %}
+{% if authentication.radius.nas_identifier is vyos_defined %}
nas-identifier={{ authentication.radius.nas_identifier }}
-{% endif %}
-{% if authentication.radius.nas_ip_address is vyos_defined %}
+{% endif %}
+{% if authentication.radius.nas_ip_address is vyos_defined %}
nas-ip-address={{ authentication.radius.nas_ip_address }}
-{% endif %}
-{% if authentication.radius.source_address is vyos_defined %}
+{% endif %}
+{% if authentication.radius.source_address is vyos_defined %}
bind={{ authentication.radius.source_address }}
-{% endif %}
-{% if authentication.radius.dynamic_author.server is vyos_defined %}
+{% endif %}
+{% 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 %}
{% endif %}
{# Both chap-secrets and radius block required the gw-ip-address #}
{% if gateway_address is vyos_defined %}
diff --git a/data/templates/accel-ppp/config_ip_pool.j2 b/data/templates/accel-ppp/config_ip_pool.j2
index ec1c77112..0bef4ad69 100644
--- a/data/templates/accel-ppp/config_ip_pool.j2
+++ b/data/templates/accel-ppp/config_ip_pool.j2
@@ -1,14 +1,14 @@
{% if client_ip_pool is vyos_defined %}
[ip-pool]
-{% if gateway_address is vyos_defined %}
+{% if gateway_address is vyos_defined %}
gw-ip-address={{ gateway_address }}
-{% endif %}
-{% if client_ip_pool.start is vyos_defined and client_ip_pool.stop is vyos_defined %}
+{% endif %}
+{% if client_ip_pool.start is vyos_defined and client_ip_pool.stop is vyos_defined %}
{{ client_ip_pool.start }}-{{ client_ip_pool.stop.split('.')[3] }}
-{% endif %}
-{% if client_ip_pool.subnet is vyos_defined %}
-{% for subnet in client_ip_pool.subnet %}
+{% endif %}
+{% if client_ip_pool.subnet is vyos_defined %}
+{% for subnet in client_ip_pool.subnet %}
{{ subnet }}
-{% endfor %}
-{% endif %}
+{% endfor %}
+{% endif %}
{% endif %}
diff --git a/data/templates/accel-ppp/config_ipv6_pool.j2 b/data/templates/accel-ppp/config_ipv6_pool.j2
index 99a930fb2..953469577 100644
--- a/data/templates/accel-ppp/config_ipv6_pool.j2
+++ b/data/templates/accel-ppp/config_ipv6_pool.j2
@@ -2,19 +2,19 @@
[ipv6-nd]
AdvAutonomousFlag=1
-{% if client_ipv6_pool.prefix is vyos_defined %}
+{% if client_ipv6_pool.prefix is vyos_defined %}
[ipv6-pool]
-{% for prefix, options in client_ipv6_pool.prefix.items() %}
+{% for prefix, options in client_ipv6_pool.prefix.items() %}
{{ prefix }},{{ options.mask }}
-{% endfor %}
-{% if client_ipv6_pool.delegate is vyos_defined %}
-{% for prefix, options in client_ipv6_pool.delegate.items() %}
+{% endfor %}
+{% if client_ipv6_pool.delegate is vyos_defined %}
+{% for prefix, options in client_ipv6_pool.delegate.items() %}
delegate={{ prefix }},{{ options.delegation_prefix }}
-{% endfor %}
+{% endfor %}
+{% endif %}
{% endif %}
-{% endif %}
-{% if client_ipv6_pool.delegate is vyos_defined %}
+{% if client_ipv6_pool.delegate is vyos_defined %}
[ipv6-dhcp]
verbose=1
-{% endif %}
+{% endif %}
{% endif %}
diff --git a/data/templates/accel-ppp/config_modules_auth_protocols.j2 b/data/templates/accel-ppp/config_modules_auth_protocols.j2
index 454d37792..285468406 100644
--- a/data/templates/accel-ppp/config_modules_auth_protocols.j2
+++ b/data/templates/accel-ppp/config_modules_auth_protocols.j2
@@ -1,10 +1,10 @@
{% for protocol in authentication.protocols %}
{# this should be fixed in the CLI by a migrator #}
-{% if protocol == 'chap' %}
+{% if protocol == 'chap' %}
auth_chap_md5
-{% elif protocol == 'mschap' %}
+{% elif protocol == 'mschap' %}
auth_mschap_v1
-{% else %}
+{% else %}
auth_{{ protocol.replace('-', '_') }}
-{% endif %}
+{% endif %}
{% endfor %}
diff --git a/data/templates/accel-ppp/config_name_server.j2 b/data/templates/accel-ppp/config_name_server.j2
index 4b4b5fb68..9c745fe62 100644
--- a/data/templates/accel-ppp/config_name_server.j2
+++ b/data/templates/accel-ppp/config_name_server.j2
@@ -1,13 +1,13 @@
{% if name_server_ipv4 is vyos_defined %}
[dns]
-{% for ns in name_server_ipv4 %}
+{% for ns in name_server_ipv4 %}
dns{{ loop.index }}={{ ns }}
-{% endfor %}
+{% endfor %}
{% endif %}
{% if name_server_ipv6 is vyos_defined %}
[ipv6-dns]
-{% for ns in name_server_ipv6 %}
+{% for ns in name_server_ipv6 %}
{{ ns }}
-{% endfor %}
+{% endfor %}
{% endif %}
diff --git a/data/templates/accel-ppp/config_shaper_radius.j2 b/data/templates/accel-ppp/config_shaper_radius.j2
index cf8b4871b..c256647e4 100644
--- a/data/templates/accel-ppp/config_shaper_radius.j2
+++ b/data/templates/accel-ppp/config_shaper_radius.j2
@@ -1,10 +1,10 @@
{% if authentication.mode is vyos_defined('radius') %}
-{% if authentication.radius.rate_limit.enable is vyos_defined %}
+{% if authentication.radius.rate_limit.enable is vyos_defined %}
[shaper]
verbose=1
attr={{ authentication.radius.rate_limit.attribute }}
-{% if authentication.radius.rate_limit.vendor is vyos_defined %}
+{% if authentication.radius.rate_limit.vendor is vyos_defined %}
vendor={{ authentication.radius.rate_limit.vendor }}
+{% endif %}
{% endif %}
-{% endif %}
{% endif %}