Newer
Older
# swmodules Schema
```
https://dev.iopsys.eu/iopsys/swmodd/schemas/ubus/swmodules.json
```
| Custom Properties | Additional Properties |
| ----------------- | --------------------- |
| Forbidden | Forbidden |
# swmodules
| List of Methods |
| ----------------------------- |
| [du_install](#du_install) | Method | swmodules (this schema) |
| [du_list](#du_list) | Method | swmodules (this schema) |
| [du_uninstall](#du_uninstall) | Method | swmodules (this schema) |
| [du_update](#du_update) | Method | swmodules (this schema) |
| [ee_list](#ee_list) | Method | swmodules (this schema) |
| [ee_set_state](#ee_set_state) | Method | swmodules (this schema) |
| [eu_list](#eu_list) | Method | swmodules (this schema) |
| [eu_set_state](#eu_set_state) | Method | swmodules (this schema) |
## du_install
### Install new deployment units/packages into Execution environment
`du_install`
- type: `Method`
### du_install Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | **Required** |
| `output` | object | Optional |
#### input
`input`
- is **required**
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| ---------- | ------- | ------------ |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
| `password` | string | Optional |
| `url` | string | **Required** |
| `username` | string | Optional |
| `uuid` | string | Optional |
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#### password
`password`
- is optional
- type: `string`
##### password Type
`string`
#### url
`url`
- is **required**
- type: `string`
##### url Type
`string`
#### username
`username`
- is optional
- type: `string`
##### username Type
`string`
#### uuid
`uuid`
- is optional
- type: `string`
##### uuid Type
`string`
### Ubus CLI Example
```
ubus call swmodules du_install {"url":"mollit deserunt","uuid":"nulla aliquip eu","username":"amet exe","password":"velit voluptate enim ad in","ee_name":"sed quis","eeid":4}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"du_install",
{
"url": "mollit deserunt",
"uuid": "nulla aliquip eu",
"username": "amet exe",
"password": "velit voluptate enim ad in",
}
]
}
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------- | ------------ |
| `status` | boolean | **Required** |
#### status
`status`
- is **required**
- type: `boolean`
##### status Type
`boolean`
### Output Example
```json
| -------- | ------ | -------- |
| `input` | object | Optional |
| `output` | | Optional |
#### input
`input`
- is optional
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| --------- | ------- | -------- |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
ubus call swmodules du_list {"eeid":6,"ee_name":"quis exercitation nisi ullamco"}
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": ["<SID>", "swmodules", "du_list", { "eeid": 6, "ee_name": "quis exercitation nisi ullamco" }]
```
#### output
`output`
- is optional
"type": "array",
"items": [
{
"type": "object",
"properties": {
"type": "string"
},
"type": "string"
},
"type": "integer",
"minimum": 1
},
"uuid": {
"type": "string"
},
"duid": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "string"
},
"config": {
"type": "string"
},
"description": {
"type": "string"
},
"vendor": {
"type": "string"
}
},
"required": ["du_name", "ee_name", "eeid", "uuid", "duid", "url", "version", "config", "description", "vendor"]
}
},
{
"type": "object",
"properties": {
"type": "array",
"items": []
}
}
"out": "{\"oneof\":[{\"deployment_unit\":[{\"du_name\":\"ea\",\"ee_name\":\"ullamco pariatur tempor\",\"uuid\":\"nostrud minim\",\"duid\":\"dolor in deserunt velit\",\"url\":\"Excepteur consequat\",\"version\":\"ut in nostrud nulla aliqu\",\"config\":\"qui\",\"description\":\"cillum ea incididunt pa\",\"vendor\":\"sed dolor\",\"eeid\":6}]},{\"deployment_unit\":[]}]}",
"simpletype": "complex"
}
```
### Output Example
```json
{
"du_name": "ea",
"ee_name": "ullamco pariatur tempor",
"uuid": "nostrud minim",
"duid": "dolor in deserunt velit",
"url": "Excepteur consequat",
"version": "ut in nostrud nulla aliqu",
"config": "qui",
"description": "cillum ea incididunt pa",
"vendor": "sed dolor",
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
]
}
```
## du_uninstall
### Uninstall installed deployment units/packages
`du_uninstall`
- type: `Method`
### du_uninstall Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | **Required** |
| `output` | object | Optional |
#### input
`input`
- is **required**
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| --------- | ------- | ------------ |
| `du_name` | string | **Required** |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
ubus call swmodules du_uninstall {"du_name":"est eiusmod culpa commodo","ee_name":"dolor ad","eeid":8}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"du_uninstall",
{ "du_name": "est eiusmod culpa commodo", "ee_name": "dolor ad", "eeid": 8 }
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
]
}
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------- | -------- |
| `status` | boolean | Optional |
#### status
`status`
- is optional
- type: `boolean`
##### status Type
`boolean`
### Output Example
```json
{ "status": true }
```
## du_update
### Update already installed deployment units
`du_update`
- type: `Method`
### du_update Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | **Required** |
| `output` | object | Optional |
#### input
`input`
- is **required**
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| ---------- | ------- | ------------ |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
| `password` | string | Optional |
| `url` | string | **Required** |
| `username` | string | Optional |
| `uuid` | string | **Required** |
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
#### password
`password`
- is optional
- type: `string`
##### password Type
`string`
#### url
`url`
- is **required**
- type: `string`
##### url Type
`string`
#### username
`username`
- is optional
- type: `string`
##### username Type
`string`
#### uuid
`uuid`
- is **required**
- type: `string`
##### uuid Type
`string`
### Ubus CLI Example
```
ubus call swmodules du_update {"url":"officia dolore eiusmod","uuid":"dolor sint","eeid":4,"ee_name":"sit amet ad","username":"aliqua non sit dolore sint","password":"Lorem in ut Duis"}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"du_update",
{
"url": "officia dolore eiusmod",
"uuid": "dolor sint",
"eeid": 4,
"ee_name": "sit amet ad",
"username": "aliqua non sit dolore sint",
"password": "Lorem in ut Duis"
}
]
}
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------- | ------------ |
| `status` | boolean | **Required** |
#### status
`status`
- is **required**
- type: `boolean`
##### status Type
`boolean`
### Output Example
```json
### Get list of available environments for software modules
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | Optional |
#### input
`input`
- is optional
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| -------- | ---- | -------- |
| None | None | None |
### Ubus CLI Example
```
{ "jsonrpc": "2.0", "id": 0, "method": "call", "params": ["<SID>", "swmodules", "ee_list", {}] }
```
#### output
`output`
- is **required**
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
"environment": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"ee_name": {
"type": "string"
},
"eeid": {
"type": "integer"
},
"status": {
"type": "string"
},
"pause": {
"type": "integer",
"minimum": 0,
"maximum": 1
},
"autoboot": {
"type": "integer",
"minimum": 0,
"maximum": 1
},
"type": {
"type": "string"
},
"vendor": {
"type": "string"
},
"version": {
"type": "string"
},
"allocated_disk_space": {
"type": "integer",
"minimum": 0
},
"available_disk_space": {
"type": "integer",
"minimum": 0
},
"allocated_memory": {
"type": "integer",
"minimum": 0
},
"available_memory": {
"type": "integer",
"minimum": 0
},
"parent_ee_ref": {
"type": "integer",
"minimum": 0
}
},
"required": [
"ee_name",
"eeid",
"status",
"pause",
"autoboot",
"type",
"vendor",
"version",
"allocated_disk_space",
"available_disk_space",
"allocated_memory",
"available_memory",
"parent_ee_Ref"
]
}
]
}
},
{
"type": "object",
"properties": {
"environment": {
"type": "array",
"items": []
}
}
"out": "{\"oneof\":[{\"environment\":[{\"ee_name\":\"Lorem in aliquip ea elit\",\"eeid\":-21467911,\"status\":\"laboris mollit\",\"pause\":1,\"autoboot\":1,\"type\":\"ea\",\"vendor\":\"pariatur aliqua in dolo\",\"version\":\"dolore\",\"allocated_disk_space\":91843673,\"available_disk_space\":80706298,\"allocated_memory\":28331192,\"available_memory\":49735843,\"parent_ee_ref\":39940718}]},{\"environment\":[]}]}",
"simpletype": "complex"
}
```
### Output Example
```json
{
"environment": [
{
"ee_name": "Lorem in aliquip ea elit",
"eeid": -21467911,
"status": "laboris mollit",
"pause": 1,
"autoboot": 1,
"type": "ea",
"vendor": "pariatur aliqua in dolo",
"version": "dolore",
"allocated_disk_space": 91843673,
"available_disk_space": 80706298,
"allocated_memory": 28331192,
"available_memory": 49735843,
"parent_ee_ref": 39940718
}
]
},
{ "environment": [] }
### Change the current state of the Execution Environment
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | **Required** |
| `output` | object | Optional |
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| --------- | ------- | ------------ |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
| `state` | string | **Required** |
- is optional
- type: `string`
#### state
`state`
- is **required**
##### state Type
`string`
The value of this property **must** be equal to one of the [known values below](#ee_set_state-known-values).
##### state Known Values
| Value |
| ------ |
| start |
| stop |
| pause |
| resume |
ubus call swmodules ee_set_state {"state":"stop","eeid":-51049577,"ee_name":"id officia consectetur nostrud"}
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"ee_set_state",
{ "state": "stop", "eeid": -51049577, "ee_name": "id officia consectetur nostrud" }
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------- | ------------ |
| `reason` | string | **Required** |
| `status` | boolean | **Required** |
#### reason
`reason`
- is **required**
- type: `string`
##### reason Type
`string`
### Output Example
```json
{ "status": true, "reason": "dolore adipisicing Ut in" }
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
```
## eu_list
### Get list of execution units (running packages)
`eu_list`
- type: `Method`
### eu_list Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | -------- |
| `input` | object | Optional |
| `output` | | Optional |
#### input
`input`
- is optional
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| --------- | ------- | -------- |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
### Ubus CLI Example
```
ubus call swmodules eu_list {"eeid":2,"ee_name":"eiusmod"}
```
### JSONRPC Example
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": ["<SID>", "swmodules", "eu_list", { "eeid": 2, "ee_name": "eiusmod" }]
}
```
#### output
`output`
- is optional
- type: complex
##### output Type
Unknown type ``.
```json
{
"oneof": [
"execution_unit": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"type": "string"
},
"command": {
"type": "string"
},
"state": {
"type": "string"
},
"config": {
"type": "string"
},
"version": {
"type": "string"
},
"description": {
"type": "string"
},
"type": "string"
},
"type": "integer",
"minimum": 1
},
"euid": {
"type": "integer",
"minimum": 0
},
"disk_space": {
"type": "integer",
"minimum": 0
},
"memory_space": {
"type": "integer",
"minimum": 0
},
"vendor": {
"type": "string"
}
},
"required": [
"config",
"version",
"description",
"euid",
"disk_space",
"memory_space",
"vendor"
]
}
]
}
},
{
"type": "object",
"properties": {
"execution_unit": {
"type": "array",
"items": []
}
}
"out": "{\"oneof\":[{\"execution_unit\":[{\"eu_name\":\"in est aliqua aliquip\",\"command\":\"proident et \",\"config\":\"reprehenderit nisi qui esse\",\"version\":\"deserunt quis do qui laborum\",\"description\":\"ipsum fugiat non\",\"ee_name\":\"enim\",\"euid\":18216158,\"disk_space\":13070620,\"memory_space\":67344135,\"vendor\":\"consequat\",\"state\":\"enim sed dolore est elit\",\"eeid\":7}]},{\"execution_unit\":[]}]}",
"simpletype": "complex"
}
```
### Output Example
```json
{
"execution_unit": [
{
"command": "proident et ",
"config": "reprehenderit nisi qui esse",
"version": "deserunt quis do qui laborum",
"description": "ipsum fugiat non",
"euid": 18216158,
"disk_space": 13070620,
"memory_space": 67344135,
"vendor": "consequat",
"state": "enim sed dolore est elit",
}
]
},
{ "execution_unit": [] }
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
## eu_set_state
### Start or stop the execution of an EU
`eu_set_state`
- type: `Method`
### eu_set_state Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | **Required** |
| `output` | object | Optional |
#### input
`input`
- is **required**
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| --------- | ------- | ------------ |
| `ee_name` | string | Optional |
| `eeid` | integer | Optional |
| `eu_name` | string | **Required** |
| `state` | boolean | **Required** |
#### ee_name
`ee_name`
- is optional
- type: `string`
##### ee_name Type
`string`
#### eeid
`eeid`
- is optional
- type: `integer`
##### eeid Type
`integer`
#### eu_name
`eu_name`
- is **required**
- type: `string`
##### eu_name Type
`string`
#### state
`state`
- is **required**
- type: `boolean`
##### state Type
`boolean`
### Ubus CLI Example
```
ubus call swmodules eu_set_state {"eu_name":"in do ea sed Excepteur","state":true,"eeid":93105262,"ee_name":"ipsum pariatur"}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"eu_set_state",
{ "eu_name": "in do ea sed Excepteur", "state": true, "eeid": 93105262, "ee_name": "ipsum pariatur" }
]
}
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------- | -------- |
| `status` | boolean | Optional |
#### status
`status`
- is optional
- type: `boolean`
##### status Type
`boolean`
### Output Example
```json
{ "status": false }
```