Skip to content
Snippets Groups Projects
Commit 7dbeb408 authored by Oskar Viljasaar's avatar Oskar Viljasaar
Browse files

add qos ubus JSON schema

Add QoS UCI config schema
parent 8298eb34
Branches
No related tags found
No related merge requests found
{
"definitions": {
"iface_t": {
"title": "Interface",
"type": "string",
"minLength": 1,
"maxLength": 16
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "qos",
"object": "qos",
"properties": {
"get_status": {
"type": "object",
"properties": {
"input": {
"type": "object",
"required": [
"ifname"
],
"properties": {
"ifname": {
"$ref": "#/definitions/iface_t"
},
"qid": {
"type": "integer",
"minimum": 0
}
}
},
"output": {
"type": "object",
"required": [
"queues"
],
"properties": {
"queues": {
"type": "array",
"items": {
"type": "object",
"required": [
"qid",
"iface",
"tx_packets",
"tx_bytes",
"tx_dropped_packets",
"tx_dropped_bytes"
],
"properties": {
"qid": {
"type": "integer",
"minimum": 0
},
"iface": {
"$ref": "#/definitions/iface_t"
},
"tx_packets": {
"type": "integer",
"minimum": 0
},
"tx_bytes": {
"type": "integer",
"minimum": 0
},
"tx_dropped_packets": {
"type": "integer",
"minimum": 0
},
"tx_dropped_bytes": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
}
}
}
}
{
"qos":
[
{
"section": "queue",
"description": "QoS queue settings",
"multi": true,
"options":
[
{
"name": "enable",
"type": "boolean",
"required": "no",
"default": "false",
"description": "Whether the specified queue configuration should be applied to it."
},
{
"name": "ifname",
"default": null,
"description": "Network interface on which the queue should be found.",
"type": "string"
},
{
"name": "precedence",
"default": 0,
"description": "Precedence/priority of the queue.",
"type": "varies"
},
{
"name": "scheduling",
"default": null,
"description": "Scheduling algorithm used for the queue.",
"type": "string"
},
{
"name": "rate",
"default": 0,
"description": "Specified the port shaping rate in kbps. A value of 0 disables shaping.",
"type": "integer"
},
{
"name": "burst_size",
"default": -1,
"description": "Port shaping burst size in bytes. A value of -1 disables the threshold.",
"type": "integer"
},
{
"name": "weight",
"default": 1,
"description": "Specified the weight of the queue in case the WRR algorithm is used.",
"type": "integer"
}
]
}
]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment