mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-10-30 01:32:26 +00:00
Merge branch 'main' into lacp
This commit is contained in:
@@ -176,6 +176,7 @@ properties:
|
||||
- Service-Telnet
|
||||
- Service-LLDP
|
||||
- Service-HTTP
|
||||
- Service-HTTPS
|
||||
- Service-GPS
|
||||
- Service-IGMP
|
||||
- Service-NTP
|
||||
|
||||
@@ -7,7 +7,8 @@ set -x
|
||||
./merge-schema.py schema schema ucentral.yml ucentral.schema.pretty.json 0 1
|
||||
./merge-schema.py schema schema ucentral.yml ucentral.schema.full.json 0 0
|
||||
./merge-schema.py state state state.yml ucentral.state.pretty.json 0 1
|
||||
./generate-reader.uc > schemareader.uc
|
||||
./merge-schema.py capabilities capabilities connect.capabilities.yml ucentral.capabilities.pretty.json 0 1
|
||||
#./generate-reader.uc > schemareader.uc
|
||||
#./generate-example.uc > input.json
|
||||
mkdir -p docs
|
||||
which generate-schema-doc > /dev/null
|
||||
|
||||
15
schema/service.https.yml
Normal file
15
schema/service.https.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
description:
|
||||
Enable the webserver with the on-boarding webui
|
||||
type: object
|
||||
properties:
|
||||
https-port:
|
||||
description:
|
||||
The port that the secure HTTP server should run on.
|
||||
type: integer
|
||||
maximum: 65535
|
||||
minimum: 1
|
||||
default: 443
|
||||
enable:
|
||||
description:
|
||||
This option whether secure http server should be enabled or disabled.
|
||||
type: boolean
|
||||
@@ -49,3 +49,5 @@ properties:
|
||||
$ref: 'https://ucentral.io/schema/v1/service/rrm/'
|
||||
telnet:
|
||||
$ref: "https://ucentral.io/schema/v1/service/telnet/"
|
||||
https:
|
||||
$ref: "https://ucentral.io/schema/v1/service/https/"
|
||||
|
||||
@@ -10440,6 +10440,53 @@ function instantiateServiceTelnet(location, value, errors) {
|
||||
return value;
|
||||
}
|
||||
|
||||
function instantiateServiceHttps(location, value, errors) {
|
||||
if (type(value) == "object") {
|
||||
let obj = {};
|
||||
|
||||
function parseHttpsPort(location, value, errors) {
|
||||
if (type(value) in [ "int", "double" ]) {
|
||||
if (value > 65535)
|
||||
push(errors, [ location, "must be lower than or equal to 65535" ]);
|
||||
|
||||
if (value < 1)
|
||||
push(errors, [ location, "must be bigger than or equal to 1" ]);
|
||||
|
||||
}
|
||||
|
||||
if (type(value) != "int")
|
||||
push(errors, [ location, "must be of type integer" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "https-port")) {
|
||||
obj.https_port = parseHttpsPort(location + "/https-port", value["https-port"], errors);
|
||||
}
|
||||
else {
|
||||
obj.https_port = 443;
|
||||
}
|
||||
|
||||
function parseEnable(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "enable")) {
|
||||
obj.enable = parseEnable(location + "/enable", value["enable"], errors);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (type(value) != "object")
|
||||
push(errors, [ location, "must be of type object" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function instantiateService(location, value, errors) {
|
||||
if (type(value) == "object") {
|
||||
let obj = {};
|
||||
@@ -10536,6 +10583,10 @@ function instantiateService(location, value, errors) {
|
||||
obj.telnet = instantiateServiceTelnet(location + "/telnet", value["telnet"], errors);
|
||||
}
|
||||
|
||||
if (exists(value, "https")) {
|
||||
obj.https = instantiateServiceHttps(location + "/https", value["https"], errors);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ items:
|
||||
$ref: "https://ucentral.io/state/v1/interface/clients/"
|
||||
counters:
|
||||
$ref: "https://ucentral.io/state/v1/interface/counter/"
|
||||
delta_counters:
|
||||
$ref: "https://ucentral.io/state/v1/interface/counter/"
|
||||
mesh-path:
|
||||
$ref: "https://ucentral.io/state/v1/interface/mesh-path/"
|
||||
ssids:
|
||||
|
||||
@@ -19,6 +19,8 @@ properties:
|
||||
- half
|
||||
counters:
|
||||
$ref: "https://ucentral.io/state/v1/interface/counter/"
|
||||
delta_counters:
|
||||
$ref: "https://ucentral.io/state/v1/interface/counter/"
|
||||
poe:
|
||||
description:
|
||||
This section describes the ethernet poe-port link-state object (statistics + PD info).
|
||||
|
||||
231
ucentral.capabilities.pretty.json
Normal file
231
ucentral.capabilities.pretty.json
Normal file
@@ -0,0 +1,231 @@
|
||||
{
|
||||
"description": "uCentral protocol (OpenLan) device and features capabilities schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"serial": {
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"aabbccddeeff"
|
||||
]
|
||||
},
|
||||
"firmware": {
|
||||
"type": "string",
|
||||
"description": "Platform revision",
|
||||
"examples": [
|
||||
"Rel 1.6 build 5"
|
||||
]
|
||||
},
|
||||
"platform": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Switch",
|
||||
"AP"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "Device model"
|
||||
},
|
||||
"hw-sku": {
|
||||
"type": "string",
|
||||
"description": "Stock keeping unit"
|
||||
},
|
||||
"compatible": {
|
||||
"type": "string",
|
||||
"description": "Compatibility string, that defines the family of the device"
|
||||
},
|
||||
"base-mac": {
|
||||
"type": "string",
|
||||
"description": "Switch MAC address",
|
||||
"format": "uc-mac",
|
||||
"examples": [
|
||||
"aa:bb:cc:dd:ee:ff"
|
||||
]
|
||||
},
|
||||
"port-list": {
|
||||
"type": "array",
|
||||
"description": "The list of physical network devices",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The logical name of the port that is used by the OS",
|
||||
"examples": [
|
||||
"Ethernet0",
|
||||
"Ethernet1",
|
||||
"Ethernet76"
|
||||
]
|
||||
},
|
||||
"front-panel-number": {
|
||||
"type": "integer",
|
||||
"description": "The identification number of the port as can be seen on the front-panel of the device"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"port-capabilities": {
|
||||
"type": "object",
|
||||
"description": "Description of physical ports and their form-factors",
|
||||
"properties": {
|
||||
"form-factors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RJ45",
|
||||
"SFP",
|
||||
"SFP+",
|
||||
"SFP28",
|
||||
"SFP-DD",
|
||||
"QSFP",
|
||||
"QSFP+",
|
||||
"QSFP28",
|
||||
"QSFP-DD"
|
||||
]
|
||||
}
|
||||
},
|
||||
"ports-list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"RJ45"
|
||||
]
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Ethernet1"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"poe-capabilities": {
|
||||
"type": "object",
|
||||
"description": "Description of physical ports and their PoE capabilities",
|
||||
"properties": {
|
||||
"supported-standards": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
".3AF-POE",
|
||||
".3AT-POE+",
|
||||
".3BT-PoE++",
|
||||
"PreStandard-Passive"
|
||||
]
|
||||
}
|
||||
},
|
||||
"power-budget": {
|
||||
"type": "integer",
|
||||
"examples": [
|
||||
2000
|
||||
]
|
||||
},
|
||||
"poe-ports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"examples": [
|
||||
".3AF-POE"
|
||||
]
|
||||
},
|
||||
"budget-capacity": {
|
||||
"type": "integer"
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Ethernet1"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"supported-features": {
|
||||
"type": "array",
|
||||
"description": "List of all features supported by the device",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"VLAN",
|
||||
"Port-Isolation",
|
||||
"Spanning-Tree",
|
||||
"Spanning-Tree-Rapid",
|
||||
"Spanning-Tree-Per-VLAN",
|
||||
"Spanning-Tree-Per-VLAN-Rapid",
|
||||
"Spanning-Tree-MSTP",
|
||||
"SVI-StaticIPv4",
|
||||
"SVI-StaticIPv6",
|
||||
"Interface-StaticIPv4",
|
||||
"Interface-StaticIPv6",
|
||||
"Routing-VRF",
|
||||
"Routing-IPv4-Route-Blackhole",
|
||||
"Routing-IPv4-Route-Unreachable",
|
||||
"Routing-IPv4-Nexthop",
|
||||
"Routing-IPv4-Broadcast",
|
||||
"Routing-IPv4-Multicast-IGMP-Snooping",
|
||||
"Routing-IPv4-Multicast-IGMP-Querier",
|
||||
"Routing-IPv4-Multicast-IGMP-Static",
|
||||
"Routing-IPv4-DHCP-Server",
|
||||
"Routing-IPv4-DHCP-Relay",
|
||||
"Routing-IPv4-DHCP-Snooping",
|
||||
"Routing-IPv4-Port-Forward",
|
||||
"Routing-IPv6-DHCP-Relay",
|
||||
"Routing-IPv6-DHCP-Stateful",
|
||||
"Routing-IPv6-DHCP-Stateless",
|
||||
"Routing-IPv6-Port-Forward",
|
||||
"PoE-Reset",
|
||||
"Port-Access-Control",
|
||||
"PAC-Dynamic-Auth",
|
||||
"System-PasswordChange",
|
||||
"System-SwUpdate",
|
||||
"System-SwUpdate-Partial",
|
||||
"Port-Mirroring",
|
||||
"Service-SSH",
|
||||
"Service-RSSH",
|
||||
"Service-Telnet",
|
||||
"Service-LLDP",
|
||||
"Service-HTTP",
|
||||
"Service-HTTPS",
|
||||
"Service-GPS",
|
||||
"Service-IGMP",
|
||||
"Service-NTP",
|
||||
"Service-MDNS",
|
||||
"Service-QoS",
|
||||
"Service-Syslog",
|
||||
"Service-PAC",
|
||||
"Service-Wireguard-Overlay",
|
||||
"Service-Radius-Proxy",
|
||||
"Service-Online-Check",
|
||||
"Service-CaptivePortal",
|
||||
"Service-PublicIpCheck",
|
||||
"Tunneling-VxLAN",
|
||||
"Tunneling-GRE",
|
||||
"Tunneling-GRE6",
|
||||
"Tunneling-L2TP",
|
||||
"Tunneling-Mesh"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {}
|
||||
}
|
||||
@@ -4808,6 +4808,23 @@
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"description": "Enable the webserver with the on-boarding webui",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"https-port": {
|
||||
"description": "The port that the secure HTTP server should run on.",
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 1,
|
||||
"default": 443
|
||||
},
|
||||
"enable": {
|
||||
"description": "This option whether secure http server should be enabled or disabled.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3690,6 +3690,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.https": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"https-port": {
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 1,
|
||||
"default": 443
|
||||
},
|
||||
"enable": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3761,6 +3775,9 @@
|
||||
},
|
||||
"telnet": {
|
||||
"$ref": "#/$defs/service.telnet"
|
||||
},
|
||||
"https": {
|
||||
"$ref": "#/$defs/service.https"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4252,6 +4252,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.https": {
|
||||
"description": "Enable the webserver with the on-boarding webui",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"https-port": {
|
||||
"description": "The port that the secure HTTP server should run on.",
|
||||
"type": "integer",
|
||||
"maximum": 65535,
|
||||
"minimum": 1,
|
||||
"default": 443
|
||||
},
|
||||
"enable": {
|
||||
"description": "This option whether secure http server should be enabled or disabled.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service": {
|
||||
"description": "This section describes all of the services that may be present on the AP. Each service is then referenced via its name inside an interface, ssid, ...",
|
||||
"type": "object",
|
||||
@@ -4324,6 +4341,9 @@
|
||||
},
|
||||
"telnet": {
|
||||
"$ref": "#/$defs/service.telnet"
|
||||
},
|
||||
"https": {
|
||||
"$ref": "#/$defs/service.https"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -762,6 +762,9 @@
|
||||
"counters": {
|
||||
"$ref": "#/$defs/interface.counter"
|
||||
},
|
||||
"delta_counters": {
|
||||
"$ref": "#/$defs/interface.counter"
|
||||
},
|
||||
"mesh-path": {
|
||||
"$ref": "#/$defs/interface.mesh-path"
|
||||
},
|
||||
@@ -890,6 +893,9 @@
|
||||
"counters": {
|
||||
"$ref": "#/$defs/interface.counter"
|
||||
},
|
||||
"delta_counters": {
|
||||
"$ref": "#/$defs/interface.counter"
|
||||
},
|
||||
"poe": {
|
||||
"description": "This section describes the ethernet poe-port link-state object (statistics + PD info). Present only in case if port has any Power sourcing capabilities.",
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user