summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-server/dhcpdv6.conf.tmpl
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-04-08 18:54:44 +0300
committerGitHub <noreply@github.com>2022-04-08 18:54:44 +0300
commitf43031ec4591662fadee3176fe1ace2ac018a9df (patch)
tree9c96321f2432ee11db826a7051b4b5adefc030c5 /data/templates/dhcp-server/dhcpdv6.conf.tmpl
parentb75b351b7dd2ec87407f98668468b1fc146428bf (diff)
parent2bf7589e926b3d5f2f7aee0f98505eeb14fc826d (diff)
downloadvyos-1x-f43031ec4591662fadee3176fe1ace2ac018a9df.tar.gz
vyos-1x-f43031ec4591662fadee3176fe1ace2ac018a9df.zip
Merge branch 'current' into T4344
Diffstat (limited to 'data/templates/dhcp-server/dhcpdv6.conf.tmpl')
-rw-r--r--data/templates/dhcp-server/dhcpdv6.conf.tmpl66
1 files changed, 33 insertions, 33 deletions
diff --git a/data/templates/dhcp-server/dhcpdv6.conf.tmpl b/data/templates/dhcp-server/dhcpdv6.conf.tmpl
index d5f277463..1a55668e1 100644
--- a/data/templates/dhcp-server/dhcpdv6.conf.tmpl
+++ b/data/templates/dhcp-server/dhcpdv6.conf.tmpl
@@ -4,74 +4,74 @@
# https://www.isc.org/wp-content/uploads/2017/08/dhcp43options.html
log-facility local7;
-{% if preference is defined and preference is not none %}
+{% if preference is vyos_defined %}
option dhcp6.preference {{ preference }};
{% endif %}
-{% if global_parameters is defined and global_parameters.name_server is defined and global_parameters.name_server is not none %}
+{% if global_parameters.name_server is vyos_defined %}
option dhcp6.name-servers {{ global_parameters.name_server | join(', ') }};
{% endif %}
# Shared network configration(s)
-{% if shared_network_name is defined and shared_network_name is not none %}
-{% for network, network_config in shared_network_name.items() if network_config.disable is not defined %}
+{% if shared_network_name is vyos_defined %}
+{% for network, network_config in shared_network_name.items() if network_config.disable is not vyos_defined %}
shared-network {{ network }} {
-{% if network_config.common_options is defined and network_config.common_options is not none %}
-{% if network_config.common_options.info_refresh_time is defined and network_config.common_options.info_refresh_time is not none %}
+{% if network_config.common_options is vyos_defined %}
+{% if network_config.common_options.info_refresh_time is vyos_defined %}
option dhcp6.info-refresh-time {{ network_config.common_options.info_refresh_time }};
{% endif %}
-{% if network_config.common_options.domain_search is defined and network_config.common_options.domain_search is not none %}
+{% if network_config.common_options.domain_search is vyos_defined %}
option dhcp6.domain-search "{{ network_config.common_options.domain_search | join('", "') }}";
{% endif %}
-{% if network_config.common_options.name_server is defined and network_config.common_options.name_server is not none %}
+{% if network_config.common_options.name_server is vyos_defined %}
option dhcp6.name-servers {{ network_config.common_options.name_server | join(', ') }};
{% endif %}
{% endif %}
-{% if network_config.subnet is defined and network_config.subnet is not none %}
+{% if network_config.subnet is vyos_defined %}
{% for subnet, subnet_config in network_config.subnet.items() %}
subnet6 {{ subnet }} {
-{% if subnet_config.address_range is defined and subnet_config.address_range is not none %}
-{% if subnet_config.address_range.prefix is defined and subnet_config.address_range.prefix is not none %}
+{% if subnet_config.address_range is vyos_defined %}
+{% if subnet_config.address_range.prefix is vyos_defined %}
{% for prefix, prefix_config in subnet_config.address_range.prefix.items() %}
- range6 {{ prefix }} {{ "temporary" if prefix_config.temporary is defined }};
+ range6 {{ prefix }} {{ "temporary" if prefix_config.temporary is vyos_defined }};
{% endfor %}
{% endif %}
-{% if subnet_config.address_range.start is defined and subnet_config.address_range.start is not none %}
+{% if subnet_config.address_range.start is vyos_defined %}
{% for address, address_config in subnet_config.address_range.start.items() %}
range6 {{ address }} {{ address_config.stop }};
{% endfor %}
{% endif %}
{% endif %}
-{% if subnet_config.domain_search is defined and subnet_config.domain_search is not none %}
+{% if subnet_config.domain_search is vyos_defined %}
option dhcp6.domain-search "{{ subnet_config.domain_search | join('", "') }}";
{% endif %}
-{% if subnet_config.lease_time is defined and subnet_config.lease_time is not none %}
-{% if subnet_config.lease_time.default is defined and subnet_config.lease_time.default is not none %}
+{% if subnet_config.lease_time is vyos_defined %}
+{% if subnet_config.lease_time.default is vyos_defined %}
default-lease-time {{ subnet_config.lease_time.default }};
{% endif %}
-{% if subnet_config.lease_time.maximum is defined and subnet_config.lease_time.maximum is not none %}
+{% if subnet_config.lease_time.maximum is vyos_defined %}
max-lease-time {{ subnet_config.lease_time.maximum }};
{% endif %}
-{% if subnet_config.lease_time.minimum is defined and subnet_config.lease_time.minimum is not none %}
+{% if subnet_config.lease_time.minimum is vyos_defined %}
min-lease-time {{ subnet_config.lease_time.minimum }};
{% endif %}
{% endif %}
-{% if subnet_config.name_server is defined and subnet_config.name_server is not none %}
+{% if subnet_config.name_server is vyos_defined %}
option dhcp6.name-servers {{ subnet_config.name_server | join(', ') }};
{% endif %}
-{% if subnet_config.nis_domain is defined and subnet_config.nis_domain is not none %}
+{% if subnet_config.nis_domain is vyos_defined %}
option dhcp6.nis-domain-name "{{ subnet_config.nis_domain }}";
{% endif %}
-{% if subnet_config.nis_server is defined and subnet_config.nis_server is not none %}
+{% if subnet_config.nis_server is vyos_defined %}
option dhcp6.nis-servers {{ subnet_config.nis_server | join(', ') }};
{% endif %}
-{% if subnet_config.nisplus_domain is defined and subnet_config.nisplus_domain is not none %}
+{% if subnet_config.nisplus_domain is vyos_defined %}
option dhcp6.nisp-domain-name "{{ subnet_config.nisplus_domain }}";
{% endif %}
-{% if subnet_config.nisplus_server is defined and subnet_config.nisplus_server is not none %}
+{% if subnet_config.nisplus_server is vyos_defined %}
option dhcp6.nisp-servers {{ subnet_config.nisplus_server | join(', ') }};
{% endif %}
-{% if subnet_config.sip_server is defined and subnet_config.sip_server is not none %}
+{% if subnet_config.sip_server is vyos_defined %}
{% set server_ip = [] %}
{% set server_fqdn = [] %}
{% for address in subnet_config.sip_server %}
@@ -81,33 +81,33 @@ shared-network {{ network }} {
{% set server_fqdn = server_fqdn.append(address) %}
{% endif %}
{% endfor %}
-{% if server_ip is defined and server_ip | length > 0 %}
+{% if server_ip is vyos_defined and server_ip | length > 0 %}
option dhcp6.sip-servers-addresses {{ server_ip | join(', ') }};
{% endif %}
-{% if server_fqdn is defined and server_fqdn | length > 0 %}
+{% if server_fqdn is vyos_defined and server_fqdn | length > 0 %}
option dhcp6.sip-servers-names "{{ server_fqdn | join('", "') }}";
{% endif %}
{% endif %}
-{% if subnet_config.sntp_server is defined and subnet_config.sntp_server is not none %}
+{% if subnet_config.sntp_server is vyos_defined %}
option dhcp6.sntp-servers {{ subnet_config.sntp_server | join(', ') }};
{% endif %}
-{% if subnet_config.prefix_delegation is defined and subnet_config.prefix_delegation.start is defined and subnet_config.prefix_delegation.start is not none %}
+{% if subnet_config.prefix_delegation.start is vyos_defined %}
{% for prefix, prefix_config in subnet_config.prefix_delegation.start.items() %}
prefix6 {{ prefix }} {{ prefix_config.stop }} /{{ prefix_config.prefix_length }};
{% endfor %}
{% endif %}
-{% if subnet_config.static_mapping is defined and subnet_config.static_mapping is not none %}
+{% if subnet_config.static_mapping is vyos_defined %}
# begin configuration of static client mappings
-{% for host, host_config in subnet_config.static_mapping.items() if host_config.disable is not defined %}
+{% for host, host_config in subnet_config.static_mapping.items() if host_config.disable is not vyos_defined %}
host {{ network | replace('_','-') }}_{{ host | replace('_','-') }} {
-{% if host_config.identifier is defined and host_config.identifier is not none %}
+{% if host_config.identifier is vyos_defined %}
host-identifier option dhcp6.client-id {{ host_config.identifier }};
{% endif %}
-{% if host_config.ipv6_address is defined and host_config.ipv6_address is not none %}
+{% if host_config.ipv6_address is vyos_defined %}
fixed-address6 {{ host_config.ipv6_address }};
{% endif %}
-{% if host_config.ipv6_prefix is defined and host_config.ipv6_prefix is not none %}
+{% if host_config.ipv6_prefix is vyos_defined %}
fixed-prefix6 {{ host_config.ipv6_prefix }};
{% endif %}
}