Skip to content

Commit 51fbd81

Browse files
committed
Correct support for multiple-item arguments.
1 parent 4f8dc5c commit 51fbd81

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ for emergencies or non-content releases).
1616

1717
## [Unreleased]
1818

19+
### Changed
20+
21+
- Corrected support for arguments which must appear multiple times in
22+
the generated unit files to represent a list of values:
23+
- 'network.bind_carrier'
24+
- 'network.dns'
25+
- 'network.ipv6_proxy_ndp_address'
26+
- 'network.ntp'
27+
- 'wireguard.allowed_ips'
28+
1929
## [25.7.1] - 2025-08-18
2030

2131
### Changed

workflow-support/parameter_mapping.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,26 @@ global_network_arguments:
5353
ipv6_forwarding: IPv6Forwarding
5454

5555
network_arguments:
56-
bind_carrier: BindCarrier
56+
bind_carrier: '*BindCarrier'
5757
bridge: Bridge
5858
configure_without_carrier: ConfigureWithoutCarrier
5959
dhcp: DHCP
6060
dhcp_prefix_delegation: DHCPPrefixDelegation
6161
dhcp_server: DHCPServer
62-
dns: DNS
62+
dns: '*DNS'
6363
emit_lldp: EmitLLDP
6464
ip_forward: IPForward
6565
ipv4_forwarding: IPv4Forwarding
6666
ipv6_accept_ra: IPv6AcceptRA
6767
ipv6_duplicate_address_detection: IPv6DuplicateAddressDetection
6868
ipv6_forwarding: IPv6Forwarding
6969
ipv6_proxy_ndp: IPv6ProxyNDP
70-
ipv6_proxy_ndp_address: IPv6ProxyNDPAddress
70+
ipv6_proxy_ndp_address: '*IPv6ProxyNDPAddress'
7171
ipv6_send_ra: IPv6SendRA
7272
keep_configuration: KeepConfiguration
7373
link_local_addressing: LinkLocalAddressing
7474
lldp: LLDP
75-
ntp: NTP
75+
ntp: '*NTP'
7676

7777
network_link_arguments:
7878
activation_policy: ActivationPolicy
@@ -214,7 +214,7 @@ wireguard_arguments:
214214
route_table: RouteTable
215215

216216
wireguard_peer_arguments:
217-
allowed_ips: AllowedIPs
217+
allowed_ips: '*AllowedIPs'
218218
endpoint: Endpoint
219219
persistent_keepalive: PersistentKeepalive
220220
preshared_key: PresharedKey
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{% macro generate_mapped_arguments(arg_map, args) %}
22
{% for arg, value in args.items() %}
33
{% if value is string or value is integer %}
4-
{{ arg_map[arg] }}={{ value }}
4+
{{ arg_map[arg] ~ '=' ~ value }}
55
{% elif value is boolean %}
6-
{{ arg_map[arg] }}={{ value|ternary('yes','no') }}
6+
{{ arg_map[arg] ~ '=' ~ value | ternary('yes','no') }}
77
{% else %}
8-
{{ arg_map[arg] }}={{ value|join(' ') }}
8+
{% set mapped_arg = arg_map[arg] %}
9+
{% if mapped_arg.startswith('*') %}
10+
{% for v in value %}
11+
{{ mapped_arg[1:] ~ '=' ~ v }}
12+
{% endfor %}
13+
{% else %}
14+
{{ mapped_arg ~ '=' ~ value | join(' ') }}
15+
{% endif %}
916
{% endif %}
1017
{% endfor %}
1118
{% endmacro %}

0 commit comments

Comments
 (0)