mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-10-30 01:32:26 +00:00
schema: implement missing pass-point functionality
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -87,6 +87,62 @@ properties:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
access-network-type:
|
||||
description:
|
||||
Indicate the type of network. This is part of the interworking IE.
|
||||
type: integer
|
||||
maximum: 15
|
||||
default: 0
|
||||
internet:
|
||||
description:
|
||||
Whether the network provides connectivity to the Internet
|
||||
type: boolean
|
||||
default: true
|
||||
asra:
|
||||
description:
|
||||
Additional Step Required for Access.
|
||||
type: boolean
|
||||
default: false
|
||||
esr:
|
||||
description:
|
||||
Emergency services reachable.
|
||||
type: boolean
|
||||
default: false
|
||||
uesa:
|
||||
description:
|
||||
Unauthenticated emergency service accessible.
|
||||
type: boolean
|
||||
default: false
|
||||
hessid:
|
||||
description:
|
||||
Homogeneous ESS identifier
|
||||
type: string
|
||||
example: 00:11:22:33:44:55
|
||||
roaming-consortium:
|
||||
description:
|
||||
Roaming Consortium OIs can be configured here. Each OI is between 3 and 15
|
||||
octets and is configured as a hexstring.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
disable-dgaf:
|
||||
description:
|
||||
Disable Downstream Group-Addressed Forwarding. This can be used to configure
|
||||
a network where no group-addressed frames are allowed.
|
||||
type: boolean
|
||||
default: false
|
||||
ipaddr-type-available:
|
||||
description:
|
||||
IP Address Type Availability.
|
||||
type: integer
|
||||
maximum: 255
|
||||
connection-capability:
|
||||
description:
|
||||
This can be used to advertise what type of IP traffic can be sent through the
|
||||
hotspot.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
icons:
|
||||
description:
|
||||
The operator icons.
|
||||
|
||||
162
schemareader.uc
162
schemareader.uc
@@ -2941,6 +2941,168 @@ function instantiateInterfaceSsidPassPoint(location, value, errors) {
|
||||
obj.friendly_name = parseFriendlyName(location + "/friendly-name", value["friendly-name"], errors);
|
||||
}
|
||||
|
||||
function parseAccessNetworkType(location, value, errors) {
|
||||
if (type(value) in [ "int", "double" ]) {
|
||||
if (value > 15)
|
||||
push(errors, [ location, "must be lower than or equal to 15" ]);
|
||||
|
||||
}
|
||||
|
||||
if (type(value) != "int")
|
||||
push(errors, [ location, "must be of type integer" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "access-network-type")) {
|
||||
obj.access_network_type = parseAccessNetworkType(location + "/access-network-type", value["access-network-type"], errors);
|
||||
}
|
||||
else {
|
||||
obj.access_network_type = 0;
|
||||
}
|
||||
|
||||
function parseInternet(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "internet")) {
|
||||
obj.internet = parseInternet(location + "/internet", value["internet"], errors);
|
||||
}
|
||||
else {
|
||||
obj.internet = true;
|
||||
}
|
||||
|
||||
function parseAsra(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "asra")) {
|
||||
obj.asra = parseAsra(location + "/asra", value["asra"], errors);
|
||||
}
|
||||
else {
|
||||
obj.asra = false;
|
||||
}
|
||||
|
||||
function parseEsr(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "esr")) {
|
||||
obj.esr = parseEsr(location + "/esr", value["esr"], errors);
|
||||
}
|
||||
else {
|
||||
obj.esr = false;
|
||||
}
|
||||
|
||||
function parseUesa(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "uesa")) {
|
||||
obj.uesa = parseUesa(location + "/uesa", value["uesa"], errors);
|
||||
}
|
||||
else {
|
||||
obj.uesa = false;
|
||||
}
|
||||
|
||||
function parseHessid(location, value, errors) {
|
||||
if (type(value) != "string")
|
||||
push(errors, [ location, "must be of type string" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "hessid")) {
|
||||
obj.hessid = parseHessid(location + "/hessid", value["hessid"], errors);
|
||||
}
|
||||
|
||||
function parseRoamingConsortium(location, value, errors) {
|
||||
if (type(value) == "array") {
|
||||
function parseItem(location, value, errors) {
|
||||
if (type(value) != "string")
|
||||
push(errors, [ location, "must be of type string" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
return map(value, (item, i) => parseItem(location + "/" + i, item, errors));
|
||||
}
|
||||
|
||||
if (type(value) != "array")
|
||||
push(errors, [ location, "must be of type array" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "roaming-consortium")) {
|
||||
obj.roaming_consortium = parseRoamingConsortium(location + "/roaming-consortium", value["roaming-consortium"], errors);
|
||||
}
|
||||
|
||||
function parseDisableDgaf(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "disable-dgaf")) {
|
||||
obj.disable_dgaf = parseDisableDgaf(location + "/disable-dgaf", value["disable-dgaf"], errors);
|
||||
}
|
||||
else {
|
||||
obj.disable_dgaf = false;
|
||||
}
|
||||
|
||||
function parseIpaddrTypeAvailable(location, value, errors) {
|
||||
if (type(value) in [ "int", "double" ]) {
|
||||
if (value > 255)
|
||||
push(errors, [ location, "must be lower than or equal to 255" ]);
|
||||
|
||||
}
|
||||
|
||||
if (type(value) != "int")
|
||||
push(errors, [ location, "must be of type integer" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "ipaddr-type-available")) {
|
||||
obj.ipaddr_type_available = parseIpaddrTypeAvailable(location + "/ipaddr-type-available", value["ipaddr-type-available"], errors);
|
||||
}
|
||||
|
||||
function parseConnectionCapability(location, value, errors) {
|
||||
if (type(value) == "array") {
|
||||
function parseItem(location, value, errors) {
|
||||
if (type(value) != "string")
|
||||
push(errors, [ location, "must be of type string" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
return map(value, (item, i) => parseItem(location + "/" + i, item, errors));
|
||||
}
|
||||
|
||||
if (type(value) != "array")
|
||||
push(errors, [ location, "must be of type array" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "connection-capability")) {
|
||||
obj.connection_capability = parseConnectionCapability(location + "/connection-capability", value["connection-capability"], errors);
|
||||
}
|
||||
|
||||
function parseIcons(location, value, errors) {
|
||||
if (type(value) == "array") {
|
||||
function parseItem(location, value, errors) {
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
".+": {
|
||||
"$ref": "#/interface/ssid/encryption",
|
||||
"$ref": "#/$defs/interface.ssid.encryption",
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
@@ -1147,6 +1147,51 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"access-network-type": {
|
||||
"type": "integer",
|
||||
"maximum": 15,
|
||||
"default": 0
|
||||
},
|
||||
"internet": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"asra": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"esr": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"uesa": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"hessid": {
|
||||
"type": "string",
|
||||
"example": "00:11:22:33:44:55"
|
||||
},
|
||||
"roaming-consortium": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"disable-dgaf": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ipaddr-type-available": {
|
||||
"type": "integer",
|
||||
"maximum": 255
|
||||
},
|
||||
"connection-capability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
Reference in New Issue
Block a user