mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-11-02 02:57:55 +00:00
ucentral-schema: add poe to the data model
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
11
cfg/cfg_poe.uc
Normal file
11
cfg/cfg_poe.uc
Normal file
@@ -0,0 +1,11 @@
|
||||
{%
|
||||
function generate_poe() {
|
||||
local poe = {};
|
||||
|
||||
for (local k, v in cfg.poe.ports)
|
||||
poe["port" + (k + 1)] = v;
|
||||
uci_render("poe", { "poe": poe});
|
||||
}
|
||||
|
||||
generate_poe();
|
||||
%}
|
||||
@@ -10,6 +10,7 @@ yaml2json schema/ssh.yml ssh.schema
|
||||
yaml2json schema/wifi-phy.yml wifi-phy.schema
|
||||
yaml2json schema/wifi-ssid.yml wifi-ssid.schema
|
||||
yaml2json schema/steer.yml steer.schema
|
||||
yaml2json schema/poe.yml poe.schema
|
||||
./merge-schema.py
|
||||
mkdir -p docs
|
||||
jsonschema2md ucentral.schema.json docs/ucentral-schema.md
|
||||
|
||||
@@ -36,4 +36,5 @@ schema_merge("log", "log.schema")
|
||||
schema_merge("ntp", "ntp.schema")
|
||||
schema_merge("ssh", "ssh.schema")
|
||||
schema_merge("steer", "steer.schema")
|
||||
schema_merge("poe", "poe.schema")
|
||||
schema_write()
|
||||
|
||||
11
schema/poe.yml
Normal file
11
schema/poe.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
type: object
|
||||
properties:
|
||||
poe:
|
||||
description:
|
||||
This Object allows you to en/disable PoE on a network port.
|
||||
type: object
|
||||
properties:
|
||||
ports:
|
||||
description:
|
||||
This is an array of the PoE state of the ports. any value other than 0 will enable PoE on a port.
|
||||
type: array
|
||||
@@ -464,6 +464,16 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"poe": {
|
||||
"description": "This Object allows you to en/disable PoE on a network port.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ports": {
|
||||
"description": "This is an array of the PoE state of the ports. any value other than 0 will enable PoE on a port.",
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user