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_set_state](#ee_set_state) | Method | swmodules (this schema) |
| [environment](#environment) | Method | swmodules (this schema) |
| [eu_activate](#eu_activate) | Method | swmodules (this schema) |
| [eu_list](#eu_list) | 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 |
| ------------- | ------- | ------------ |
| `eid` | integer | Optional |
| `environment` | string | Optional |
| `uuid` | string | Optional |
| `url` | string | **Required** |
| `username` | string | Optional |
| `password` | string | Optional |
#### eid
`eid`
- is optional
- type: `integer`
##### eid Type
`integer`
71
72
73
74
75
76
77
78
79
80
81
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
#### environment
`environment`
- is optional
- type: `string`
##### environment Type
`string`
#### 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","environment":"sed quis","eid":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",
"environment": "sed quis",
"eid": 4
}
]
}
```
#### 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
```
## du_list
### Get list of deployment units (installed packages)
`du_list`
- type: `Method`
### du_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:
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
| Property | Type | Required |
| ------------- | ------- | -------- |
| `eid` | integer | Optional |
| `environment` | string | Optional |
#### eid
`eid`
- is optional
- type: `integer`
##### eid Type
`integer`
#### environment
`environment`
- is optional
- type: `string`
##### environment Type
`string`
ubus call swmodules du_list {"eid":6,"environment":"quis exercitation nisi ullamco"}
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": ["<SID>", "swmodules", "du_list", { "eid": 6, "environment": "quis exercitation nisi ullamco" }]
}
```
#### output
`output`
- is optional
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
"execution_unit": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"environment": {
"type": "string"
},
"eid": {
"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": ["name", "environment", "uuid", "duid", "url", "version", "config", "description", "vendor"]
}
]
}
},
{
"type": "object",
"properties": {
"execution_unit": {
"type": "array",
"items": []
}
}
"out": "{\"oneof\":[{\"execution_unit\":[{\"name\":\"ea\",\"environment\":\"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\",\"eid\":6}]},{\"execution_unit\":[]}]}",
"simpletype": "complex"
}
```
### Output Example
```json
{
"execution_unit": [
{
"name": "ea",
"environment": "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",
"eid": 6
}
]
},
{ "execution_unit": [] }
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 |
| ------------- | ------- | ------------ |
| `eid` | integer | Optional |
| `environment` | string | Optional |
| `name` | string | **Required** |
#### eid
`eid`
- is optional
- type: `integer`
##### eid Type
`integer`
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
#### environment
`environment`
- is optional
- type: `string`
##### environment Type
`string`
#### name
`name`
- is **required**
- type: `string`
##### name Type
`string`
### Ubus CLI Example
```
ubus call swmodules du_uninstall {"name":"est eiusmod culpa commodo","environment":"dolor ad","eid":8}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"du_uninstall",
{ "name": "est eiusmod culpa commodo", "environment": "dolor ad", "eid": 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:
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
| Property | Type | Required |
| ------------- | ------- | ------------ |
| `eid` | integer | Optional |
| `environment` | string | Optional |
| `password` | string | Optional |
| `url` | string | **Required** |
| `username` | string | Optional |
| `uuid` | string | **Required** |
#### eid
`eid`
- is optional
- type: `integer`
##### eid Type
`integer`
#### environment
`environment`
- is optional
- type: `string`
##### environment Type
`string`
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","eid":4,"environment":"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",
"eid": 4,
"environment": "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
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
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
780
781
782
783
784
785
786
787
788
789
790
## ee_set_state
### Change the current state of the Execution Environment
`ee_set_state`
- type: `Method`
### ee_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 |
| ------------- | ------- | ------------ |
| `eid` | integer | Optional |
| `environment` | string | Optional |
| `state` | string | **Required** |
#### eid
`eid`
- is optional
- type: `integer`
##### eid Type
`integer`
#### environment
`environment`
- is optional
- type: `string`
##### environment Type
`string`
#### state
`state`
- is **required**
- type: reference
##### 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 CLI Example
```
ubus call swmodules ee_set_state {"state":"stop","eid":3,"environment":"ea anim veniam minim ut"}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": [
"<SID>",
"swmodules",
"ee_set_state",
{ "state": "stop", "eid": 3, "environment": "ea anim veniam minim ut" }
]
}
```
#### 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`
#### status
`status`
- is **required**
- type: `boolean`
##### status Type
`boolean`
### Output Example
```json
{ "status": true, "reason": "ipsum irure id" }
```
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
## environment
### Get list of available environments for software modules
`environment`
- type: `Method`
### environment Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | Optional |
| `output` | object | **Required** |
#### input
`input`
- is optional
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| -------- | ---- | -------- |
| None | None | None |
### Ubus CLI Example
```
ubus call swmodules environment {}
```
### JSONRPC Example
```json
{ "jsonrpc": "2.0", "id": 0, "method": "call", "params": ["<SID>", "swmodules", "environment", {}] }
```
#### output
`output`
- is **required**
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| ------------- | ----- | -------- |
| `environment` | array | Optional |
#### environment
`environment`
- is optional
- type: `array`
##### environment Type
Array type: `array`
All items must be of the type: Unknown type ``.
```json
{
"type": "array",
"items": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"pause": {
"type": "integer",
"minimum": 0,
"maximum": 1
},
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
"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
}
},
"required": [
"name",
"status",
"type",
"vendor",
"version",
"allocated_disk_space",
"available_disk_space",
"allocated_memory",
"available_memory"
]
}
],
"simpletype": "`array`"
}
```
### Output Example
```json
{
"environment": [
{
"name": "sunt velit eiusmod",
"status": "ut dolor ut",
"type": "deserunt fugiat ea",
"vendor": "ipsum irure",
"version": "veniam laboris",
"allocated_disk_space": 70947665,
"available_disk_space": 868904,
"allocated_memory": 40901874,
"available_memory": 61168718
}
]
}
```
### Start or stop the execution of an EU
### eu_activate Type
| Property | Type | Required |
| -------- | ------ | ------------ |
| `input` | object | **Required** |
| `output` | object | Optional |
- type: `object`
##### input Type
`object` with following properties:
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
999
1000
| Property | Type | Required |
| -------------- | ------- | ------------ |
| `eid` | integer | Optional |
| `environment` | string | Optional |
| `service_name` | string | **Required** |
| `state` | boolean | **Required** |
#### eid
`eid`
- is optional
- type: `integer`
##### eid Type
`integer`
#### environment
`environment`
- is optional
- type: `string`
##### environment Type