mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-10-30 01:32:26 +00:00
renderer: add support for rendering IPv6 schema properties
Also consolidate existing IPv4 interface config while we're at it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
committed by
John Crispin
parent
b98b153a54
commit
e2590c3338
@@ -1,15 +1,11 @@
|
||||
set network.{{name}}=interface_4
|
||||
set network.{{ name }}_4.ucentral_name={{ s(interface.name) }}
|
||||
set network.{{ name }}_4.ucentral_path={{ s(location) }}
|
||||
set network.{{ name }}_4.ifname={{ netdev }}
|
||||
set network.{{ name }}_4.metric={{ interface.metric }}
|
||||
{% if (interface.role == 'upstream' && interface.vlan): %}
|
||||
set network.{{ name }}_4.ip4table={{ this_vid }}
|
||||
{% endif %}
|
||||
{% if (ipv4_mode == 'static'): %}
|
||||
set network.{{ name }}_4.proto=static
|
||||
set network.{{ name }}_4.ipaddr={{ ipcalc.generate_prefix(state, interface.ipv4.subnet) }}
|
||||
{% else %}
|
||||
set network.{{ name }}_4.proto=dhcp
|
||||
{% endif %}
|
||||
set network.{{ name }}.ip4table={{ this_vid }}
|
||||
{% endif %}
|
||||
{% if (ipv4_mode == 'static'): %}
|
||||
set network.{{ name }}.ipaddr={{ ipcalc.generate_prefix(state, ipv4.subnet, false) }}
|
||||
{% else %}
|
||||
set network.{{ name }}.peerdns={{ b(!length(ipv4.use_dns)) }}
|
||||
{% for (let dns in ipv4.use_dns): %}
|
||||
add_list network.{{ name }}.dns={{ dns }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user