Skip to content

Commit

Permalink
ucentral-schema: various cleanups for the new schema
Browse files Browse the repository at this point in the history
Signed-off-by: John Crispin <[email protected]>
  • Loading branch information
blogic committed May 3, 2021
1 parent 21c6ebe commit 1025971
Show file tree
Hide file tree
Showing 24 changed files with 72 additions and 68 deletions.
4 changes: 2 additions & 2 deletions new/generate-example.uc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ let GeneratorProto = {

emit_number: function(numberSpec)
{
assert(numberSpec.type == "number", "Expecting number type");
assert(numberSpec.type == "integer", "Expecting number type");

let rv = this.emit_generic(numberSpec);

Expand Down Expand Up @@ -223,7 +223,7 @@ let GeneratorProto = {
case "string":
return this.emit_string(valueSpec);

case "number":
case "integer":
return this.emit_number(valueSpec);

case "boolean":
Expand Down
2 changes: 2 additions & 0 deletions new/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ properties:
Define the IPv4 range that is delegatable to the downstream interfaces
This is described as a CIDR block. (192.168.0.0/16, 172.16.128/17)
type: string
format: uc-cidr4
example:
- 192.168.0.0/16
ipv6-network:
description:
Define the IPv6 range that is delegatable to the downstream interfaces
This is described as a CIDR block. (fdca:1234:4567::/48)
type: string
format: uc-cidr6
example:
- fdca:1234:4567::/48
4 changes: 2 additions & 2 deletions new/interface.bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ properties:
mtu:
description:
The MTU that shall be used by the network interface.
type: number
type: integer
maximum: 65535
minimum: 256
example:
Expand All @@ -15,7 +15,7 @@ properties:
The Transmit Queue Length is a TCP/IP stack network interface value that
sets the number of packets allowed per kernel transmit queue of a network
interface device.
type: number
type: integer
example:
- 5000
isolate-ports:
Expand Down
3 changes: 1 addition & 2 deletions new/interface.ethernet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ properties:
description:
Enforce a specific MAC to these ports.
type: string
maxLength: 17
minLength: 17
format: uc-mac
example:
- true
reverse-path-filter:
Expand Down
6 changes: 3 additions & 3 deletions new/interface.ipv4.dhcp-lease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ properties:
description:
The MAC address of the host that this lease shall be used for.
type: string
maxLength: 17
minLength: 17
format: uc-mac
example:
- 00:11:22:33:44:55
static-lease-offset:
description:
The offset of the IP that shall be used in relation to the first IP
in the available range.
type: number
type: integer
example:
- 10
lease-time:
description:
How long the lease is valid before a RENEW muss ne issued.
type: string
format: uc-timeout
default: 6h
publish-hostname:
description:
Expand Down
3 changes: 3 additions & 0 deletions new/interface.ipv4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ properties:
auto/24 can be used, causing the configuration layer to automatically use
and address range from globals.ipv4-network.
type: string
format: uc-cidr4
example:
- auto/24
gateway:
description:
This option defines the static IPv4 gateway of the logical interface.
type: string
format: uc-cidr4
example:
- 192.168.1.1
send-hostname:
Expand All @@ -40,6 +42,7 @@ properties:
type: array
items:
type: string
format: uc-cidr4
example:
- 8.8.8.8
- 4.4.4.4
Expand Down
26 changes: 11 additions & 15 deletions new/interface.ssid.captive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,30 @@ properties:
description:
The fqdn used for the captive portal IP.
type: string
format: fqdn
default: ucentral.splash
maxclients:
description:
The maximum number of clients that shall be accept.
type: number
example:
- 32
type: integer
default: 32
upload-rate:
description:
The maximum upload rate for a specific client.
type: number
example:
- 10000
type: integer
default: 10000
download-rate:
description:
The maximum download rate for a specific client.
type: number
example:
- 10000
type: integer
default: 10000
upload-quota:
description:
The maximum upload quota for a specific client.
type: number
example:
- 10000
type: integer
default : 10000
download-quota:
description:
The maximum download quota for a specific client.
type: number
example:
- 10000
type: integer
default: 10000
2 changes: 1 addition & 1 deletion new/interface.ssid.encryption.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ properties:
ieee80211w:
description:
Enable 802.11w Management Frame Protection (MFP) for this BSS.
type: number
type: integer
maximum: 2
minimum: 0
example:
Expand Down
6 changes: 3 additions & 3 deletions new/interface.ssid.pass-point.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ properties:
venue-group:
description:
The available values are defined in 802.11u.
type: number
type: integer
maximum: 32
venue-type:
description:
The available values are defined in IEEE Std 802.11u-2011, 7.3.1.34
type: number
type: integer
maximum: 32
venue-url:
description:
Expand Down Expand Up @@ -45,7 +45,7 @@ properties:
description:
ANQP Domain ID, An identifier for a set of APs in an ESS that share the
same common ANQP information.
type: number
type: integer
maximum: 65535
friendly-name:
description:
Expand Down
5 changes: 2 additions & 3 deletions new/interface.ssid.radius.local-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ description:
properties:
mac:
type: string
maxLength: 17
minLength: 17
format: uc-mac
example:
- 00:11:22:33:44:55
key:
Expand All @@ -15,7 +14,7 @@ properties:
example:
- aaaaaaaa
vid:
type: number
type: integer
maximum: 4096
example:
- 100
3 changes: 2 additions & 1 deletion new/interface.ssid.radius.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ properties:
description:
The URI of our Radius server.
type: string
format: uc-host
example:
- 192.168.1.10
port:
description:
The network of our Radius server.
type: number
type: integer
maximum: 65535
minimum: 1024
example:
Expand Down
2 changes: 1 addition & 1 deletion new/interface.ssid.radius.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ properties:
interval:
description:
The interim accounting update interval. This value is defined in seconds.
type: number
type: integer
maximum: 600
minimum: 60
default: 60
4 changes: 2 additions & 2 deletions new/interface.ssid.rate-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ properties:
ingress-rate:
description:
The ingress rate to which hosts will be shaped. Values are in Mbps
type: number
type: integer
default: 0
egress-rate:
description:
The egress rate to which hosts will be shaped. Values are in Mbps
type: number
type: integer
default: 0
4 changes: 2 additions & 2 deletions new/interface.ssid.rates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ properties:
beacon:
description:
The beacon rate that shall be used by the BSS. Values are in Mbps.
type: number
type: integer
default: 0
multicast:
description:
The multicast rate that shall be used by the BSS. Values are in Mbps.
type: number
type: integer
default: 0
2 changes: 1 addition & 1 deletion new/interface.ssid.rrm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ properties:
stationary-ap:
description:
Stationary AP config indicates that the AP doesn't move.
type: number
type: integer
19 changes: 9 additions & 10 deletions new/interface.ssid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ properties:
items:
type: string
enum:
- 2
- 5
- 5l
- 5u
- 6
- 2G
- 5G
- 5Gl
- 5Gu
- 6G
bss-mode:
description:
Selects the operation mode of the wireless network interface controller.
Expand All @@ -35,20 +35,19 @@ properties:
description:
Override the BSSID of the network, only applicable in adhoc or sta mode.
type: string
maxLength: 17
minLength: 17
format: uc-mac
beacon-interval:
description:
Beacon interval in kus (1.024 ms).
type: number
type: integer
maximum: 1000
minimum: 15
dtim-period:
description:
Set the DTIM (delivery traffic information message) period. There will
be one DTIM per this many beacon frames. This may be set between 1 and
255. This option only has an effect on ap wifi-ifaces.
type: number
type: integer
maximum: 255
minimum: 1
hidden-ssid:
Expand All @@ -67,7 +66,7 @@ properties:
rts-threshold:
description:
Set the RTS/CTS threshold of the BSS.
type: number
type: integer
maximum: 65535
minimum: 1
broadcast-time:
Expand Down
2 changes: 1 addition & 1 deletion new/interface.vlan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ properties:
This is the pvid of the vlan that shall be assigned to the interface.
The individual physical network devices contained within the interface
need to be told explicitly if egress traffic shall be tagged.
type: number
type: integer
maximum: 4096
proto:
decription:
Expand Down
4 changes: 2 additions & 2 deletions new/interface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ properties:
The role defines if the interface is upstream or downstream facing.
type: string
enum:
- upstream
- downstream
- upstream
- downstream
example:
- downstream
isolate-hosts:
Expand Down
6 changes: 3 additions & 3 deletions new/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ properties:
interval:
description:
The reporting interval defined in seconds.
type: number
type: integer
types:
description:
A list of names of subsystems that shall be reported periodically.
Expand All @@ -27,7 +27,7 @@ properties:
interval:
description:
The reporting interval defined in seconds.
type: number
type: integer
types:
description:
A list of names of subsystems that shall be reported periodically.
Expand All @@ -43,7 +43,7 @@ properties:
interval:
description:
The reporting interval defined in seconds.
type: number
type: integer
types:
description:
A list of the message types that shall be sent to the backend.
Expand Down
Loading

0 comments on commit 1025971

Please sign in to comment.