mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-11-02 11:08:00 +00:00
ucentral-schema: add captive portal support
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
15
cfg/cfg_captive.uc
Normal file
15
cfg/cfg_captive.uc
Normal file
@@ -0,0 +1,15 @@
|
||||
{%
|
||||
function generate_captive() {
|
||||
let opennds = {};
|
||||
|
||||
uci_defaults(cfg.captive { "enabled": 0, "gatewayname": "uCentral", "gatewayfqdn": "ucentral.splash",
|
||||
"maxclients": "64", "authidletimeout": 120, "uploadrate": 0,
|
||||
"downloadrate": 0, "uploadquota": 0, "downloadquota": 0 };
|
||||
uci_set_options(opennds, cfg.captive, { "enabled", "gatewayname", "gatewayfqdn", "maxclients",
|
||||
"authidletimeout", "uploadrate", "downloadrate",
|
||||
"uploadquota", "downloadquota" });
|
||||
uci_render("opennds", { opennds });
|
||||
}
|
||||
|
||||
generate_captive();
|
||||
%}
|
||||
@@ -15,6 +15,7 @@ yaml2json schema/lldp.yml lldp.schema
|
||||
yaml2json schema/rtty.yml rtty.schema
|
||||
yaml2json schema/stats.yml stats.schema
|
||||
yaml2json schema/mqtt.yml mqtt.schema
|
||||
yaml2json schema/captive.yml captive.schema
|
||||
./merge-schema.py
|
||||
mkdir -p docs
|
||||
jsonschema2md ucentral.schema.json docs/ucentral-schema.md
|
||||
|
||||
@@ -41,4 +41,5 @@ schema_merge("lldp", "lldp.schema")
|
||||
schema_merge("rtty", "rtty.schema")
|
||||
schema_merge("stats", "stats.schema")
|
||||
schema_merge("mqtt", "mqtt.schema")
|
||||
schema_merge("captive", "captive.schema")
|
||||
schema_write()
|
||||
|
||||
41
schema/captive.yml
Normal file
41
schema/captive.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
type: object
|
||||
properties:
|
||||
captive:
|
||||
description:
|
||||
This section can be used to setup a captive portal on the AP.
|
||||
type: object
|
||||
properties:
|
||||
enabled:
|
||||
description:
|
||||
Enable this option to tell the unit that it shall start a captive portal.
|
||||
type: number
|
||||
maximum: 1
|
||||
minimum: 0
|
||||
gatewayname:
|
||||
type: string
|
||||
description:
|
||||
This name will be presented to connecting users in on the splash page.
|
||||
gatewayfqdn:
|
||||
type: string
|
||||
description:
|
||||
The fqdn used for the captive portal IP.
|
||||
maxclients:
|
||||
type: number
|
||||
description:
|
||||
The number of clients that we accept.
|
||||
uploadrate:
|
||||
type: number
|
||||
description:
|
||||
The maximum upload rate for a specific client.
|
||||
downloadrate:
|
||||
type: number
|
||||
description:
|
||||
The maximum download rate for a specific client.
|
||||
uploadquota:
|
||||
type: number
|
||||
description:
|
||||
The maximum upload quota for a specific client.
|
||||
downloadquota:
|
||||
type: number
|
||||
description:
|
||||
The maximum download quota for a specific client.
|
||||
@@ -662,6 +662,46 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"captive": {
|
||||
"description": "This section can be used to setup a captive portal on the AP.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"description": "Enable this option to tell the unit that it shall start a captive portal.",
|
||||
"type": "number",
|
||||
"maximum": 1,
|
||||
"minimum": 0
|
||||
},
|
||||
"gatewayname": {
|
||||
"type": "string",
|
||||
"description": "This name will be presented to connecting users in on the splash page."
|
||||
},
|
||||
"gatewayfqdn": {
|
||||
"type": "string",
|
||||
"description": "The fqdn used for the captive portal IP."
|
||||
},
|
||||
"maxclients": {
|
||||
"type": "number",
|
||||
"description": "The number of clients that we accept."
|
||||
},
|
||||
"uploadrate": {
|
||||
"type": "number",
|
||||
"description": "The maximum upload rate for a specific client."
|
||||
},
|
||||
"downloadrate": {
|
||||
"type": "number",
|
||||
"description": "The maximum download rate for a specific client."
|
||||
},
|
||||
"uploadquota": {
|
||||
"type": "number",
|
||||
"description": "The maximum upload quota for a specific client."
|
||||
},
|
||||
"downloadquota": {
|
||||
"type": "number",
|
||||
"description": "The maximum download quota for a specific client."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user