diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-15 21:57:03 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-15 21:57:03 +0200 |
commit | abfe42d11137373f6549d17e69618840d574e524 (patch) | |
tree | 429a9520d54977a8dd307005be122b0b4b91ee14 /src | |
parent | c2b54ed6d1dc49a908e77d5fd96a2f4e2e01f887 (diff) | |
download | vyos-1x-abfe42d11137373f6549d17e69618840d574e524.tar.gz vyos-1x-abfe42d11137373f6549d17e69618840d574e524.zip |
dhcp(v6)-server: T4353: fix Jinja2 linting errors
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/dhcp_server.py | 4 | ||||
-rwxr-xr-x | src/conf_mode/dhcpv6_server.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/dhcp_server.py b/src/conf_mode/dhcp_server.py index d27f8d995..52b682d6d 100755 --- a/src/conf_mode/dhcp_server.py +++ b/src/conf_mode/dhcp_server.py @@ -286,7 +286,7 @@ def generate(dhcp): # Please see: https://phabricator.vyos.net/T1129 for quoting of the raw # parameters we can pass to ISC DHCPd tmp_file = '/tmp/dhcpd.conf' - render(tmp_file, 'dhcp-server/dhcpd.conf.tmpl', dhcp, + render(tmp_file, 'dhcp-server/dhcpd.conf.j2', dhcp, formater=lambda _: _.replace(""", '"')) # XXX: as we have the ability for a user to pass in "raw" options via VyOS # CLI (see T3544) we now ask ISC dhcpd to test the newly rendered @@ -299,7 +299,7 @@ def generate(dhcp): # Now that we know that the newly rendered configuration is "good" we can # render the "real" configuration - render(config_file, 'dhcp-server/dhcpd.conf.tmpl', dhcp, + render(config_file, 'dhcp-server/dhcpd.conf.j2', dhcp, formater=lambda _: _.replace(""", '"')) return None diff --git a/src/conf_mode/dhcpv6_server.py b/src/conf_mode/dhcpv6_server.py index be1e6db1e..9922f2c5c 100755 --- a/src/conf_mode/dhcpv6_server.py +++ b/src/conf_mode/dhcpv6_server.py @@ -161,7 +161,7 @@ def generate(dhcpv6): if not dhcpv6 or 'disable' in dhcpv6: return None - render(config_file, 'dhcp-server/dhcpdv6.conf.tmpl', dhcpv6) + render(config_file, 'dhcp-server/dhcpdv6.conf.j2', dhcpv6) return None def apply(dhcpv6): |