mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
- Transaction APIs removed - Use different save dirs per proto - In process instance update notifier - Use event based refresh timer - Commit changes from main daemon for default proto - For add request commit changes without reload for default proto - extend bbf.config to monitor based on input - extend bbf.config to reload/commit based on input - extend bb.config to provide list of service changes based on proto
684 lines
20 KiB
JSON
684 lines
20 KiB
JSON
{
|
|
"definitions": {
|
|
"path_t": {
|
|
"description": "Complete object element path as per TR181",
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"maxLength": 1024,
|
|
"examples": [
|
|
"Device.",
|
|
"Device.DeviceInfo.Manufacturer",
|
|
"Device.WiFi.SSID.1.",
|
|
"Device.WiFi."
|
|
]
|
|
},
|
|
"schema_path_t": {
|
|
"description": "Datamodel object schema path",
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"maxLength": 1024,
|
|
"examples": [
|
|
"Device.Bridging.Bridge.{i}.",
|
|
"Device.DeviceInfo.Manufacturer",
|
|
"Device.WiFi.SSID.{i}.SSID"
|
|
]
|
|
},
|
|
"boolean_t": {
|
|
"type": "string",
|
|
"enum": [
|
|
"0",
|
|
"1"
|
|
]
|
|
},
|
|
"operate_path_t": {
|
|
"description": "Datamodel object schema path",
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"maxLength": 1024,
|
|
"examples": [
|
|
"Device.IP.Diagnostics.IPPing()",
|
|
"Device.DHCPv4.Client.{i}.Renew()",
|
|
"Device.FactoryReset()"
|
|
]
|
|
},
|
|
"query_path_t": {
|
|
"description": "DM object path with search queries",
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"maxLength": 1024,
|
|
"examples": [
|
|
"Device.",
|
|
"Device.DeviceInfo.Manufacturer",
|
|
"Device.WiFi.SSID.1.BSSID",
|
|
"Device.WiFi.SSID.*.BSSID",
|
|
"Device.WiFi."
|
|
]
|
|
},
|
|
"instance_t": {
|
|
"description": "Multi object instances",
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"maxLength": 256
|
|
},
|
|
"proto_t": {
|
|
"type": "string",
|
|
"default": "both",
|
|
"enum": [
|
|
"usp",
|
|
"cwmp",
|
|
"both"
|
|
]
|
|
},
|
|
"type_t": {
|
|
"type": "string",
|
|
"enum": [
|
|
"xsd:string",
|
|
"xsd:unsignedInt",
|
|
"xsd:int",
|
|
"xsd:unsignedLong",
|
|
"xsd:long",
|
|
"xsd:boolean",
|
|
"xsd:dateTime",
|
|
"xsd:hexBinary",
|
|
"xsd:object",
|
|
"xsd:command",
|
|
"xsd:event"
|
|
]
|
|
},
|
|
"fault_t": {
|
|
"type": "integer",
|
|
"minimum": 7000,
|
|
"maximum": 9050
|
|
},
|
|
"trans_type_t": {
|
|
"type": "string",
|
|
"enum": [
|
|
"start",
|
|
"commit",
|
|
"abort",
|
|
"status"
|
|
]
|
|
},
|
|
"srv_type_t": {
|
|
"type": "string",
|
|
"enum": [
|
|
"register",
|
|
"list"
|
|
]
|
|
},
|
|
"format_t": {
|
|
"type": "string",
|
|
"default": "pretty",
|
|
"enum": [
|
|
"raw",
|
|
"pretty"
|
|
]
|
|
}
|
|
},
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://dev.iopsys.eu/bbf/bbfdm/-/blob/devel/docs/api/ubus/bbfdm.md",
|
|
"type": "object",
|
|
"title": "bbf",
|
|
"object": "bbf",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"schema": {
|
|
"title": "Get list of supported datamodel parameters",
|
|
"description": "Schema will have all the nodes/objects supported by libbbf",
|
|
"type": "object",
|
|
"required": [
|
|
"output"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/query_path_t"
|
|
},
|
|
"paths": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": [
|
|
{
|
|
"$ref": "#/definitions/query_path_t"
|
|
}
|
|
]
|
|
},
|
|
"first_level": {
|
|
"type": "boolean",
|
|
"description": "gets only first level objects if true"
|
|
},
|
|
"commands": {
|
|
"type": "boolean",
|
|
"description": "includes commands in the list if true"
|
|
},
|
|
"events": {
|
|
"type": "boolean",
|
|
"description": "includes events in the list if true"
|
|
},
|
|
"params": {
|
|
"type": "boolean",
|
|
"description": "includes objs/params in the list if true"
|
|
},
|
|
"optional": {
|
|
"type": "object",
|
|
"properties": {
|
|
"proto": {
|
|
"$ref": "#/definitions/proto_t"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/schema_path_t"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/boolean_t"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/type_t"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"input": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/schema_path_t"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/boolean_t"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/type_t"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"output": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/schema_path_t"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/boolean_t"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/type_t"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"title": "Get handler",
|
|
"description": "Query the datamodel object",
|
|
"type": "object",
|
|
"required": [
|
|
"input",
|
|
"output"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/query_path_t"
|
|
},
|
|
"paths": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": [
|
|
{
|
|
"$ref": "#/definitions/query_path_t"
|
|
}
|
|
]
|
|
},
|
|
"maxdepth": {
|
|
"type": "integer",
|
|
"description": "Integer to decide the depth of data model to be parsed"
|
|
},
|
|
"optional": {
|
|
"type": "object",
|
|
"properties": {
|
|
"format": {
|
|
"$ref": "#/definitions/format_t"
|
|
},
|
|
"proto": {
|
|
"$ref": "#/definitions/proto_t"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"data": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/type_t"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"instances": {
|
|
"title": "Instance query handler",
|
|
"description": "Get the instances of multi object",
|
|
"type": "object",
|
|
"required": [
|
|
"input"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/query_path_t"
|
|
},
|
|
"first_level": {
|
|
"type": "boolean",
|
|
"description": "gets only first level objects if true"
|
|
},
|
|
"optional": {
|
|
"type": "object",
|
|
"properties": {
|
|
"proto": {
|
|
"$ref": "#/definitions/proto_t"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"add": {
|
|
"title": "Add a new object instance",
|
|
"description": "Add a new object in multi instance object",
|
|
"type": "object",
|
|
"required": [
|
|
"input",
|
|
"output"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"obj_path": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"data": {
|
|
"type": "string"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"del": {
|
|
"title": "Delete object instance",
|
|
"description": "Delete a object instance from multi instance object",
|
|
"type": "object",
|
|
"required": [
|
|
"input",
|
|
"output"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"paths": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": [
|
|
{
|
|
"$ref": "#/definitions/query_path_t"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"data": {
|
|
"type": "string"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
}
|
|
},
|
|
"required": [
|
|
"parameter",
|
|
"type"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"set": {
|
|
"title": "Set handler",
|
|
"description": "Set values of datamodel object element",
|
|
"type": "object",
|
|
"required": [
|
|
"input",
|
|
"output"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"path",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/query_path_t"
|
|
},
|
|
"value": {
|
|
"description": "value of the object element provided in path, path should contains valid writable object element",
|
|
"type": "string",
|
|
"examples": [
|
|
"{\"path\":\"Device.WiFi.SSID.1.SSID\", \"value\":\"test_ssid\"}",
|
|
"{\"path\":\"Device.WiFi.SSID.2.Enable\", \"value\":\"true\"}",
|
|
"{\"path\":\"Device.WiFi.SSID.1.Enable\", \"value\":\"0\"}"
|
|
]
|
|
},
|
|
"obj_path": {
|
|
"description": "To set multiple values at once, path should be relative to object elements",
|
|
"examples": [
|
|
"{\"path\":\"Device.WiFi.SSID.1.\", \"obj_path\":{\"SSID\":\"test_ssid\",\"Name\":\"test_name\"}}",
|
|
"{\"path\":\"Device.WiFi.SSID.2.\", \"obj_path\":{\"SSID\":\"test_ssid\"}}"
|
|
],
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/boolean_t"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operate": {
|
|
"title": "Operate handler",
|
|
"description": "Operate on object element provided in path",
|
|
"type": "object",
|
|
"required": [
|
|
"input",
|
|
"output"
|
|
],
|
|
"properties": {
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"command"
|
|
],
|
|
"properties": {
|
|
"command": {
|
|
"$ref": "#/definitions/operate_path_t"
|
|
},
|
|
"command_key": {
|
|
"type": "string"
|
|
},
|
|
"input": {
|
|
"description": "Input arguments for the operate command as defined in TR-181-2.13",
|
|
"examples": [
|
|
"{\"path\":\"Device.IP.Diagnostics.IPPing\\(\\)\", \"input\":{\"Host\":\"iopsys.eu\"}}"
|
|
],
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"optional": {
|
|
"type": "object",
|
|
"properties": {
|
|
"format": {
|
|
"$ref": "#/definitions/format_t"
|
|
},
|
|
"proto": {
|
|
"$ref": "#/definitions/proto_t"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/boolean_t"
|
|
},
|
|
"fault": {
|
|
"$ref": "#/definitions/fault_t",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"fault_msg": {
|
|
"type": "string",
|
|
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
|
|
},
|
|
"output": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/definitions/path_t"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/boolean_t"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/type_t"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"data"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|