mirror of
https://github.com/Telecominfraproject/wlan-ucentral-schema.git
synced 2026-01-27 10:23:38 +00:00
Since PSE Power on/off Control needs to be done through the ucentral config file, multiple config nodes and corresponding ucodes have been added. Poe is placed under the ethernet node. Fixes: WIFI-14724 Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
21 lines
623 B
Ucode
21 lines
623 B
Ucode
{% let eth_ports = ethernet.lookup_by_select_ports(ports.select_ports) %}
|
|
{% for (let port in eth_ports): %}
|
|
{% let nport = replace(port, '.', '_'); %}
|
|
set network.{{ nport }}=device
|
|
set network.{{ nport }}.name={{ s(port) }}
|
|
set network.{{ nport }}.ifname={{ s(port) }}
|
|
set network.{{ nport }}.enabled={{ ports.enabled }}
|
|
{% if (!ports.speed && !ports.duplex) continue %}
|
|
set network.{{ nport }}.speed={{ ports.speed }}
|
|
set network.{{ nport }}.duplex={{ ports.duplex == "full" ? true : false }}
|
|
|
|
{% endfor %}
|
|
{%
|
|
if (ports?.poe) {
|
|
include("ethernet/poe.uc",{
|
|
select_ports: ports.select_ports,
|
|
poe: ports.poe
|
|
});
|
|
}
|
|
%}
|