diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-11-29 20:13:08 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-11-29 20:13:08 +0100 |
commit | ea3c4544634a9d916deff4bd6cdce1522d395a0d (patch) | |
tree | 1dc6ba72b8544090a56ab9b9335a7e4a5155fe2e /data | |
parent | 4d3acd6e6fb0b5600cc65bb962c99305f10f92c1 (diff) | |
download | vyos-1x-ea3c4544634a9d916deff4bd6cdce1522d395a0d.tar.gz vyos-1x-ea3c4544634a9d916deff4bd6cdce1522d395a0d.zip |
dhcpv6-relay: T3095: migrate service to get_config_dict()
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/dhcp-relay/dhcrelay6.conf.tmpl | 17 | ||||
-rw-r--r-- | data/templates/dhcpv6-relay/config.tmpl | 4 |
2 files changed, 17 insertions, 4 deletions
diff --git a/data/templates/dhcp-relay/dhcrelay6.conf.tmpl b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl new file mode 100644 index 000000000..165216592 --- /dev/null +++ b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl @@ -0,0 +1,17 @@ +### Autogenerated by dhcpv6_relay.py ### + +{# upstream_interface is mandatory so it's always present #} +{% set upstream = namespace(value='') %} +{% for interface, config in upstream_interface.items() %} +{% for address in config.address %} +{% set upstream.value = upstream.value + '-u ' + address + '%' + interface + ' ' %} +{% endfor %} +{% endfor %} +{# listen_interface is mandatory so it's always present #} +{% set listen = namespace(value='') %} +{% for interface, config in listen_interface.items() %} +{% set listen.value = listen.value + '-l ' + config.address + '%' + interface + ' ' %} +{% endfor %} + +OPTIONS="{{ listen.value }} {{ upstream.value }} -c {{ max_hop_count }} {{ '-I' if use_interface_id_option is defined }}" + diff --git a/data/templates/dhcpv6-relay/config.tmpl b/data/templates/dhcpv6-relay/config.tmpl deleted file mode 100644 index 55035ae6c..000000000 --- a/data/templates/dhcpv6-relay/config.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -### Autogenerated by dhcpv6_relay.py ### - -# Defaults for isc-dhcp-relay6.service -OPTIONS="-l {{ listen_addr | join(' -l ') }} -u {{ upstream_addr | join(' -u ') }} {{ options | join(' ') }}" |