Added alias value in schema for cwmp GPN

This commit is contained in:
Suvendhu Hansa 2024-07-12 14:54:34 +05:30
parent 1eaf1298af
commit c252002089
6 changed files with 166 additions and 124 deletions

View file

@ -886,6 +886,7 @@ void bbfdm_get_names(bbfdm_data_t *data)
blobmsg_add_string(&data->bb, "path", n->name);
blobmsg_add_string(&data->bb, "data", n->data);
blobmsg_add_string(&data->bb, "type", n->type);
blobmsg_add_string(&data->bb, "info", n->additional_data ? n->additional_data : "");
blobmsg_close_table(&data->bb, table);
}
}

View file

@ -202,6 +202,9 @@
"type": "string",
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
},
"info": {
"type": "string"
},
"input": {
"type": "array",
"items": [

View file

@ -141,7 +141,7 @@ Device.WiFi.
### Ubus CLI Example
```
ubus call bbf add {"path":"amet enim in dolore qui","optional":{"transaction_id":38993374},"obj_path":{}}
ubus call bbf add {"path":"dolore magna","optional":{"transaction_id":48031089},"obj_path":{}}
```
### JSONRPC Example
@ -155,7 +155,7 @@ ubus call bbf add {"path":"amet enim in dolore qui","optional":{"transaction_id"
"<SID>",
"bbf",
"add",
{ "path": "amet enim in dolore qui", "optional": { "transaction_id": 38993374 }, "obj_path": {} }
{ "path": "dolore magna", "optional": { "transaction_id": 48031089 }, "obj_path": {} }
]
}
```
@ -220,7 +220,16 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{ "results": [{ "path": "pariatur ut", "data": "temp", "fault": 7365, "fault_msg": "irure sed anim Ut" }] }
{
"results": [
{
"path": "commodo oc",
"data": "reprehenderit amet culpa Excepteur",
"fault": 8107,
"fault_msg": "elit in ea ut non"
}
]
}
```
## del
@ -352,7 +361,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf del {"path":"aute magna Ut esse","paths":["nostrud Duis deserunt"],"optional":{"transaction_id":33739431}}
ubus call bbf del {"path":"non ipsu","paths":["dolor nisi amet veniam Duis"],"optional":{"transaction_id":85944852}}
```
### JSONRPC Example
@ -366,7 +375,7 @@ ubus call bbf del {"path":"aute magna Ut esse","paths":["nostrud Duis deserunt"]
"<SID>",
"bbf",
"del",
{ "path": "aute magna Ut esse", "paths": ["nostrud Duis deserunt"], "optional": { "transaction_id": 33739431 } }
{ "path": "non ipsu", "paths": ["dolor nisi amet veniam Duis"], "optional": { "transaction_id": 85944852 } }
]
}
```
@ -431,16 +440,7 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{
"results": [
{
"path": "ad aliquip ut nulla",
"data": "sit ex dolor nisi reprehenderit",
"fault": 8077,
"fault_msg": "cillum qu"
}
]
}
{ "results": [{ "path": "cupidatat in", "data": "tempo", "fault": 7626, "fault_msg": "mollit dolore commodo" }] }
```
## get
@ -504,10 +504,10 @@ Integer to decide the depth of data model to be parsed
`object` with following properties:
| Property | Type | Required | Default |
| --------------- | ------- | -------- | ---------- |
| `format` | string | Optional | `"pretty"` |
| `proto` | string | Optional | `"both"` |
| Property | Type | Required | Default |
| -------- | ------ | -------- | ---------- |
| `format` | string | Optional | `"pretty"` |
| `proto` | string | Optional | `"both"` |
#### format
@ -619,7 +619,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf get {"path":"reprehende","paths":["nostrud"],"maxdepth":-31156882,"optional":{"format":"pretty","proto":"cwmp"}}
ubus call bbf get {"path":"esseco","paths":["esttempor labore nisi cillum sint"],"maxdepth":-31080155,"optional":{"format":"pretty","proto":"cwmp"}}
```
### JSONRPC Example
@ -634,9 +634,9 @@ ubus call bbf get {"path":"reprehende","paths":["nostrud"],"maxdepth":-31156882,
"bbf",
"get",
{
"path": "reprehende",
"paths": ["nostrud"],
"maxdepth": -31156882,
"path": "esseco",
"paths": ["esttempor labore nisi cillum sint"],
"maxdepth": -31080155,
"optional": { "format": "pretty", "proto": "cwmp" }
}
]
@ -709,11 +709,11 @@ All items must be of the type: Unknown type ``.
{
"results": [
{
"path": "pariatur occaecat ut sit",
"data": "minim aliq",
"type": "xsd:unsignedInt",
"fault": 9034,
"fault_msg": "sit minim nulla"
"path": "quisExcepteur ullamco magna non et",
"data": "dolor nisi ex eu ut",
"type": "xsd:unsignedLong",
"fault": 8725,
"fault_msg": "elit Lorem"
}
]
}
@ -779,9 +779,9 @@ gets only first level objects if true
`object` with following properties:
| Property | Type | Required | Default |
| --------------- | ------- | -------- | -------- |
| `proto` | string | Optional | `"both"` |
| Property | Type | Required | Default |
| -------- | ------ | -------- | -------- |
| `proto` | string | Optional | `"both"` |
#### proto
@ -846,7 +846,7 @@ Device.WiFi.
### Ubus CLI Example
```
ubus call bbf instances {"path":"veniam","first_level":false,"optional":{"proto":"cwmp"}}
ubus call bbf instances {"path":"elitanim Lorem eiusmod ea","first_level":false,"optional":{"proto":"both"}}
```
### JSONRPC Example
@ -860,7 +860,7 @@ ubus call bbf instances {"path":"veniam","first_level":false,"optional":{"proto"
"<SID>",
"bbf",
"instances",
{ "path": "veniam", "first_level": false, "optional": { "proto": "cwmp" } }
{ "path": "elitanim Lorem eiusmod ea", "first_level": false, "optional": { "proto": "both" } }
]
}
```
@ -922,7 +922,11 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{ "results": [{ "path": "deserunt inc", "fault": 7529, "fault_msg": "exercitation proident" }] }
{
"results": [
{ "path": "fugiat reprehenderit sunt aliqua est", "fault": 7511, "fault_msg": "Duis ut labore proident" }
]
}
```
## notify_event
@ -987,7 +991,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf notify_event {"name":"Lorem","input":{}}
ubus call bbf notify_event {"name":"dolore voluptate minim","input":{}}
```
### JSONRPC Example
@ -997,7 +1001,7 @@ ubus call bbf notify_event {"name":"Lorem","input":{}}
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": ["<SID>", "bbf", "notify_event", { "name": "Lorem", "input": {} }]
"params": ["<SID>", "bbf", "notify_event", { "name": "dolore voluptate minim", "input": {} }]
}
```
@ -1292,10 +1296,10 @@ Input arguments for the operate command as defined in TR-181-2.13
`object` with following properties:
| Property | Type | Required | Default |
| --------------- | ------- | -------- | ---------- |
| `format` | string | Optional | `"pretty"` |
| `proto` | string | Optional | `"both"` |
| Property | Type | Required | Default |
| -------- | ------ | -------- | ---------- |
| `format` | string | Optional | `"pretty"` |
| `proto` | string | Optional | `"both"` |
#### format
@ -1343,7 +1347,7 @@ The value of this property **must** be equal to one of the [known values below](
### Ubus CLI Example
```
ubus call bbf operate {"command":"ex in sint ullamco","command_key":"in culpa in","input":{},"optional":{"format":"raw","proto":"cwmp"}}
ubus call bbf operate {"command":"minim enim au","command_key":"proident adipisicing enim ullamco","input":{},"optional":{"format":"pretty","proto":"cwmp"}}
```
### JSONRPC Example
@ -1358,10 +1362,10 @@ ubus call bbf operate {"command":"ex in sint ullamco","command_key":"in culpa in
"bbf",
"operate",
{
"command": "ex in sint ullamco",
"command_key": "in culpa in",
"command": "minim enim au",
"command_key": "proident adipisicing enim ullamco",
"input": {},
"optional": { "format": "raw", "proto": "cwmp" }
"optional": { "format": "pretty", "proto": "cwmp" }
}
]
}
@ -1449,11 +1453,11 @@ All items must be of the type: Unknown type ``.
{
"results": [
{
"path": "ipsum velit cillum",
"path": "quis dolor occaecat tempor",
"data": "1",
"fault": 8382,
"fault_msg": "ullamco dolore sed pariatur",
"output": [{ "path": "pariatur fugiat voluptate non Excepteur", "data": "1", "type": "xsd:hexBinary" }]
"fault": 8348,
"fault_msg": "aliqua dolore ad eu id",
"output": [{ "path": "sit esse dolor", "data": "1", "type": "xsd:command" }]
}
]
}
@ -1655,7 +1659,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf schema {"path":"nondo labo","paths":["mollit dolor dolor"],"first_level":false,"commands":false,"events":false,"params":false,"optional":{"proto":"both"}}
ubus call bbf schema {"path":"ut nisi Duis aliqua","paths":["anim aliqua in ipsum mollit"],"first_level":true,"commands":true,"events":false,"params":true,"optional":{"proto":"both"}}
```
### JSONRPC Example
@ -1670,12 +1674,12 @@ ubus call bbf schema {"path":"nondo labo","paths":["mollit dolor dolor"],"first_
"bbf",
"schema",
{
"path": "nondo labo",
"paths": ["mollit dolor dolor"],
"first_level": false,
"commands": false,
"path": "ut nisi Duis aliqua",
"paths": ["anim aliqua in ipsum mollit"],
"first_level": true,
"commands": true,
"events": false,
"params": false,
"params": true,
"optional": { "proto": "both" }
}
]
@ -1734,6 +1738,9 @@ All items must be of the type: Unknown type ``.
"type": "string",
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
},
"info": {
"type": "string"
},
"input": {
"type": "array",
"items": [
@ -1786,13 +1793,14 @@ All items must be of the type: Unknown type ``.
{
"results": [
{
"path": "amet labore tempor aliquip",
"path": "laboris",
"data": "1",
"type": "xsd:command",
"fault": 7713,
"fault_msg": "nostrud",
"input": [{ "path": "dolor ex amet laborum dolore", "data": "1", "type": "xsd:string" }],
"output": [{ "path": "consectetur dolor ut", "data": "0", "type": "xsd:string" }]
"type": "xsd:int",
"fault": 8767,
"fault_msg": "cupidatat amet",
"info": "laborum",
"input": [{ "path": "quiselit ad", "data": "0", "type": "xsd:hexBinary" }],
"output": [{ "path": "ipsum do Lorem nulla officia", "data": "0", "type": "xsd:unsignedLong" }]
}
]
}
@ -1895,7 +1903,7 @@ Object path where the micro-service object will be added
### Ubus CLI Example
```
ubus call bbf service {"cmd":"list","name":"voluptate et","parent_dm":"eiusmod nisi anim amet","object":"sint laboris ullamco"}
ubus call bbf service {"cmd":"register","name":"ea","parent_dm":"Ut labore in","object":"Duis commodo"}
```
### JSONRPC Example
@ -1909,7 +1917,7 @@ ubus call bbf service {"cmd":"list","name":"voluptate et","parent_dm":"eiusmod n
"<SID>",
"bbf",
"service",
{ "cmd": "list", "name": "voluptate et", "parent_dm": "eiusmod nisi anim amet", "object": "sint laboris ullamco" }
{ "cmd": "register", "name": "ea", "parent_dm": "Ut labore in", "object": "Duis commodo" }
]
}
```
@ -1955,7 +1963,7 @@ ubus call bbf service {"cmd":"list","name":"voluptate et","parent_dm":"eiusmod n
### Output Example
```json
{ "status": false, "error": "dolore" }
{ "status": true, "error": "tempor consectetur minim id anim" }
```
## set
@ -2143,7 +2151,7 @@ value of the object element provided in path, path should contains valid writabl
### Ubus CLI Example
```
ubus call bbf set {"path":"Duis et","value":"elit velit fugiat mollit sunt","optional":{"proto":"cwmp","transaction_id":94067988},"obj_path":{}}
ubus call bbf set {"path":"amet aute laboris irure ad","value":"est dolore","optional":{"proto":"usp","transaction_id":79839602},"obj_path":{}}
```
### JSONRPC Example
@ -2158,9 +2166,9 @@ ubus call bbf set {"path":"Duis et","value":"elit velit fugiat mollit sunt","opt
"bbf",
"set",
{
"path": "Duis et",
"value": "elit velit fugiat mollit sunt",
"optional": { "proto": "cwmp", "transaction_id": 94067988 },
"path": "amet aute laboris irure ad",
"value": "est dolore",
"optional": { "proto": "usp", "transaction_id": 79839602 },
"obj_path": {}
}
]
@ -2227,11 +2235,7 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{
"results": [
{ "path": "mollit id est esse", "data": "0", "fault": 8853, "fault_msg": "ex consectetur officia irure enim" }
]
}
{ "results": [{ "path": "eiusmod tempor dolore", "data": "1", "fault": 7804, "fault_msg": "amet commodo id tempor" }] }
```
## transaction
@ -2352,7 +2356,7 @@ Timeout (in milliseconds) for the transaction, on timeout changes will be revert
### Ubus CLI Example
```
ubus call bbf transaction {"cmd":"status","timeout":25780595,"restart_services":false,"optional":{"transaction_id":25378647}}
ubus call bbf transaction {"cmd":"commit","timeout":98560738,"restart_services":false,"optional":{"transaction_id":36502520}}
```
### JSONRPC Example
@ -2366,7 +2370,7 @@ ubus call bbf transaction {"cmd":"status","timeout":25780595,"restart_services":
"<SID>",
"bbf",
"transaction",
{ "cmd": "status", "timeout": 25780595, "restart_services": false, "optional": { "transaction_id": 25378647 } }
{ "cmd": "commit", "timeout": 98560738, "restart_services": false, "optional": { "transaction_id": 36502520 } }
]
}
```
@ -2426,5 +2430,5 @@ ubus call bbf transaction {"cmd":"status","timeout":25780595,"restart_services":
### Output Example
```json
{ "status": false, "transaction_id": 41612487, "error": "Lorem mollit ut" }
{ "status": true, "transaction_id": 33849248, "error": "Duis nostrud amet enim" }
```

View file

@ -208,6 +208,9 @@
"type": "string",
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
},
"info": {
"type": "string"
},
"input": {
"type": "array",
"items": [

View file

@ -139,7 +139,7 @@ Device.WiFi.
### Ubus CLI Example
```
ubus call bbf add {"path":"estanim Ut","optional":{"transaction_id":31269307},"obj_path":{}}
ubus call bbf add {"path":"labore ullamco","optional":{"transaction_id":3482835},"obj_path":{}}
```
### JSONRPC Example
@ -153,7 +153,7 @@ ubus call bbf add {"path":"estanim Ut","optional":{"transaction_id":31269307},"o
"<SID>",
"bbf",
"add",
{ "path": "estanim Ut", "optional": { "transaction_id": 31269307 }, "obj_path": {} }
{ "path": "labore ullamco", "optional": { "transaction_id": 3482835 }, "obj_path": {} }
]
}
```
@ -220,7 +220,12 @@ All items must be of the type: Unknown type ``.
```json
{
"results": [
{ "path": "nulla voluptate eiusmod sit", "data": "ni", "fault": 7499, "fault_msg": "laboris pariatur tempor" }
{
"path": "tempor consequat dolor",
"data": "in aliquip",
"fault": 7759,
"fault_msg": "ea irure sunt laboris commodo"
}
]
}
```
@ -354,7 +359,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf del {"path":"amet e","paths":["magna ani"],"optional":{"transaction_id":75019380}}
ubus call bbf del {"path":"laborum","paths":["aliquip ea"],"optional":{"transaction_id":37938814}}
```
### JSONRPC Example
@ -368,7 +373,7 @@ ubus call bbf del {"path":"amet e","paths":["magna ani"],"optional":{"transactio
"<SID>",
"bbf",
"del",
{ "path": "amet e", "paths": ["magna ani"], "optional": { "transaction_id": 75019380 } }
{ "path": "laborum", "paths": ["aliquip ea"], "optional": { "transaction_id": 37938814 } }
]
}
```
@ -435,7 +440,7 @@ All items must be of the type: Unknown type ``.
```json
{
"results": [
{ "path": "qui ex officia", "data": "nostrud est do ex", "fault": 7045, "fault_msg": "sed sunt Lorem occaecat" }
{ "path": "proident eiusmod et Lorem", "data": "ullamco sed", "fault": 8168, "fault_msg": "sint quis nostrud est" }
]
}
```
@ -632,7 +637,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf get {"path":"occaecat culpa","paths":["non voluptate"],"maxdepth":42643410,"optional":{"format":"pretty","proto":"both","instance_mode":0}}
ubus call bbf get {"path":"officia","paths":["aliqua nisi sunt"],"maxdepth":-49153948,"optional":{"format":"raw","proto":"cwmp","instance_mode":0}}
```
### JSONRPC Example
@ -647,10 +652,10 @@ ubus call bbf get {"path":"occaecat culpa","paths":["non voluptate"],"maxdepth":
"bbf",
"get",
{
"path": "occaecat culpa",
"paths": ["non voluptate"],
"maxdepth": 42643410,
"optional": { "format": "pretty", "proto": "both", "instance_mode": 0 }
"path": "officia",
"paths": ["aliqua nisi sunt"],
"maxdepth": -49153948,
"optional": { "format": "raw", "proto": "cwmp", "instance_mode": 0 }
}
]
}
@ -719,7 +724,17 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{ "results": [{ "path": "veniam ", "data": "et", "type": "xsd:int", "fault": 7572, "fault_msg": "enim" }] }
{
"results": [
{
"path": "anim sit aute non mollit",
"data": "sed consectetur ipsum exercitation magna",
"type": "xsd:string",
"fault": 8050,
"fault_msg": "nostrud nisi laboris exercitation"
}
]
}
```
## instances
@ -865,7 +880,7 @@ Device.WiFi.
### Ubus CLI Example
```
ubus call bbf instances {"path":"fugiat anim Lorem reprehende","first_level":false,"optional":{"proto":"cwmp","instance_mode":0}}
ubus call bbf instances {"path":"id aliquip","first_level":false,"optional":{"proto":"usp","instance_mode":1}}
```
### JSONRPC Example
@ -879,11 +894,7 @@ ubus call bbf instances {"path":"fugiat anim Lorem reprehende","first_level":fal
"<SID>",
"bbf",
"instances",
{
"path": "fugiat anim Lorem reprehende",
"first_level": false,
"optional": { "proto": "cwmp", "instance_mode": 0 }
}
{ "path": "id aliquip", "first_level": false, "optional": { "proto": "usp", "instance_mode": 1 } }
]
}
```
@ -945,7 +956,7 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{ "results": [{ "path": "in ipsum proident Duis nulla", "fault": 8425, "fault_msg": "elit culpa" }] }
{ "results": [{ "path": "ad qui ", "fault": 7181, "fault_msg": "elit" }] }
```
## operate
@ -1127,7 +1138,7 @@ The value of this property **must** be equal to one of the [known values below](
### Ubus CLI Example
```
ubus call bbf operate {"command":"exipsum cillum labore cupidatat minim","command_key":"ullamco nostrud sunt","input":{},"optional":{"format":"raw","proto":"both","instance_mode":1}}
ubus call bbf operate {"command":"et sit dolor","command_key":"nulla velit ut in Excepteur","input":{},"optional":{"format":"raw","proto":"both","instance_mode":0}}
```
### JSONRPC Example
@ -1142,10 +1153,10 @@ ubus call bbf operate {"command":"exipsum cillum labore cupidatat minim","comman
"bbf",
"operate",
{
"command": "exipsum cillum labore cupidatat minim",
"command_key": "ullamco nostrud sunt",
"command": "et sit dolor",
"command_key": "nulla velit ut in Excepteur",
"input": {},
"optional": { "format": "raw", "proto": "both", "instance_mode": 1 }
"optional": { "format": "raw", "proto": "both", "instance_mode": 0 }
}
]
}
@ -1233,11 +1244,11 @@ All items must be of the type: Unknown type ``.
{
"results": [
{
"path": "deserunt cillum amet",
"path": "aliqua",
"data": "0",
"fault": 7140,
"fault_msg": "laborum",
"output": [{ "path": "proident", "data": "1", "type": "xsd:boolean" }]
"fault": 7611,
"fault_msg": "ea occaecat voluptate tempor",
"output": [{ "path": "consequat dolor elit", "data": "1", "type": "xsd:int" }]
}
]
}
@ -1439,7 +1450,7 @@ All items must be of the type: Unknown type ``.
### Ubus CLI Example
```
ubus call bbf schema {"path":"magna cillum consequat","paths":["nisi nulla ullamco"],"first_level":false,"commands":false,"events":true,"params":false,"optional":{"proto":"both"}}
ubus call bbf schema {"path":"laboris elit in dolore ali","paths":["pariatur elit eu"],"first_level":false,"commands":false,"events":false,"params":false,"optional":{"proto":"usp"}}
```
### JSONRPC Example
@ -1454,13 +1465,13 @@ ubus call bbf schema {"path":"magna cillum consequat","paths":["nisi nulla ullam
"bbf",
"schema",
{
"path": "magna cillum consequat",
"paths": ["nisi nulla ullamco"],
"path": "laboris elit in dolore ali",
"paths": ["pariatur elit eu"],
"first_level": false,
"commands": false,
"events": true,
"events": false,
"params": false,
"optional": { "proto": "both" }
"optional": { "proto": "usp" }
}
]
}
@ -1518,6 +1529,9 @@ All items must be of the type: Unknown type ``.
"type": "string",
"Description": "Any discrepancy in input will result in fault. The type of fault can be identified by fault code"
},
"info": {
"type": "string"
},
"input": {
"type": "array",
"items": [
@ -1570,13 +1584,14 @@ All items must be of the type: Unknown type ``.
{
"results": [
{
"path": "Duis in dolore",
"path": "Excepteur irure consequat",
"data": "0",
"type": "xsd:dateTime",
"fault": 7341,
"fault_msg": "",
"input": [{ "path": "veniam officia consectetur aute", "data": "0", "type": "xsd:dateTime" }],
"output": [{ "path": "velit laboris Lorem proident officia", "data": "1", "type": "xsd:unsignedLong" }]
"fault": 7546,
"fault_msg": "cupidatat Excepteur",
"info": "ullamco dolor occaecat",
"input": [{ "path": "minim pariatur id laboris ut", "data": "1", "type": "xsd:unsignedInt" }],
"output": [{ "path": "ea enim Excepteur proident est", "data": "1", "type": "xsd:long" }]
}
]
}
@ -1783,7 +1798,7 @@ value of the object element provided in path, path should contains valid writabl
### Ubus CLI Example
```
ubus call bbf set {"path":"qui ullamco non","value":"ut aliquip anim ex","optional":{"proto":"cwmp","instance_mode":0,"transaction_id":62652682},"obj_path":{}}
ubus call bbf set {"path":"nonmagna ut anim","value":"cupidatat","optional":{"proto":"usp","instance_mode":0,"transaction_id":45864115},"obj_path":{}}
```
### JSONRPC Example
@ -1798,9 +1813,9 @@ ubus call bbf set {"path":"qui ullamco non","value":"ut aliquip anim ex","option
"bbf",
"set",
{
"path": "qui ullamco non",
"value": "ut aliquip anim ex",
"optional": { "proto": "cwmp", "instance_mode": 0, "transaction_id": 62652682 },
"path": "nonmagna ut anim",
"value": "cupidatat",
"optional": { "proto": "usp", "instance_mode": 0, "transaction_id": 45864115 },
"obj_path": {}
}
]
@ -1867,7 +1882,7 @@ All items must be of the type: Unknown type ``.
### Output Example
```json
{ "results": [{ "path": "labore et amet", "data": "0", "fault": 7959, "fault_msg": "dolor sunt" }] }
{ "results": [{ "path": "pariatur", "data": "0", "fault": 8723, "fault_msg": "ut aliquip" }] }
```
## transaction
@ -1988,7 +2003,7 @@ Timeout (in milliseconds) for the transaction, on timeout changes will be revert
### Ubus CLI Example
```
ubus call bbf transaction {"cmd":"start","timeout":81531371,"restart_services":false,"optional":{"transaction_id":25600713}}
ubus call bbf transaction {"cmd":"commit","timeout":95277085,"restart_services":false,"optional":{"transaction_id":36491321}}
```
### JSONRPC Example
@ -2002,7 +2017,7 @@ ubus call bbf transaction {"cmd":"start","timeout":81531371,"restart_services":f
"<SID>",
"bbf",
"transaction",
{ "cmd": "start", "timeout": 81531371, "restart_services": false, "optional": { "transaction_id": 25600713 } }
{ "cmd": "commit", "timeout": 95277085, "restart_services": false, "optional": { "transaction_id": 36491321 } }
]
}
```
@ -2062,5 +2077,5 @@ ubus call bbf transaction {"cmd":"start","timeout":81531371,"restart_services":f
### Output Example
```json
{ "status": false, "transaction_id": 44817555, "error": "labore id laborum mollit" }
{ "status": false, "transaction_id": 87022462, "error": "occaecat Excepteur" }
```

View file

@ -1504,6 +1504,7 @@ static int get_ubus_name(struct dmctx *dmctx, struct dmnode *node)
char *path = dmjson_get_value(res_obj, 1, "path");
char *data = dmjson_get_value(res_obj, 1, "data");
char *type = dmjson_get_value(res_obj, 1, "type");
char *info = dmjson_get_value(res_obj, 1, "info");
if (dmctx->nextlevel) {
unsigned int path_dot_num = count_occurrences(path, '.');
@ -1514,7 +1515,7 @@ static int get_ubus_name(struct dmctx *dmctx, struct dmnode *node)
continue;
}
add_list_parameter(dmctx, dmstrdup(path), dmstrdup(data), dmstrdup(type), NULL);
add_list_parameter(dmctx, dmstrdup(path), dmstrdup(data), dmstrdup(type), info);
}
return 0;
@ -1817,12 +1818,17 @@ static int mparam_get_name(DMPARAM_ARGS)
} else {
char *refparam;
char *perm = leaf->permission->val;
char *alias = "";
dmastrcat(&refparam, node->current_object, leaf->parameter);
if (leaf->permission->get_permission != NULL)
perm = leaf->permission->get_permission(refparam, dmctx, data, instance);
add_list_parameter(dmctx, refparam, perm, DMT_TYPE[leaf->type], NULL);
if (DM_LSTRCMP(leaf->parameter, "Alias") == 0) {
(leaf->getvalue)(refparam, dmctx, data, instance, &alias);
}
add_list_parameter(dmctx, refparam, perm, DMT_TYPE[leaf->type], alias);
return 0;
}
}
@ -1841,6 +1847,7 @@ static int mparam_get_name_in_param(DMPARAM_ARGS)
} else {
char *refparam;
char *perm = leaf->permission->val;
char *alias = "";
dmastrcat(&refparam, node->current_object, leaf->parameter);
@ -1867,7 +1874,11 @@ static int mparam_get_name_in_param(DMPARAM_ARGS)
if (leaf->permission->get_permission != NULL)
perm = leaf->permission->get_permission(refparam, dmctx, data, instance);
add_list_parameter(dmctx, refparam, perm, DMT_TYPE[leaf->type], NULL);
if (DM_LSTRCMP(leaf->parameter, "Alias") == 0) {
(leaf->getvalue)(refparam, dmctx, data, instance, &alias);
}
add_list_parameter(dmctx, refparam, perm, DMT_TYPE[leaf->type], alias);
dmctx->findparam = (dmctx->iswildcard) ? 1 : 0;
return 0;
}
@ -1907,13 +1918,18 @@ static int mparam_get_name_in_obj(DMPARAM_ARGS)
} else {
char *refparam;
char *perm = leaf->permission->val;
char *alias = "";
dmastrcat(&refparam, node->current_object, leaf->parameter);
if (leaf->permission->get_permission != NULL)
perm = leaf->permission->get_permission(refparam, dmctx, data, instance);
add_list_parameter(dmctx, refparam, perm, DMT_TYPE[leaf->type], NULL);
if (DM_LSTRCMP(leaf->parameter, "Alias") == 0) {
(leaf->getvalue)(refparam, dmctx, data, instance, &alias);
}
add_list_parameter(dmctx, refparam, perm, DMT_TYPE[leaf->type], alias);
return 0;
}
}