Skip to content
Snippets Groups Projects
swmodules.md 21.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • Vivek Dutta's avatar
    Vivek Dutta committed
    # 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) |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    | [eu_list](#eu_list)           | Method | swmodules (this schema) |
    
    | [eu_set_state](#eu_set_state) | Method | swmodules (this schema) |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ## 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     |
    
    #### ee_name
    
    `ee_name`
    
    - type: `string`
    
    ##### ee_name Type
    
    `string`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    #### eeid
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    - is optional
    
    - type: `integer`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    ##### eeid Type
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    `integer`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### 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}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### 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",
    
          "ee_name": "sed quis",
          "eeid": 4
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        }
      ]
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    
    | Property | Type    | Required     |
    | -------- | ------- | ------------ |
    | `status` | boolean | **Required** |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### status
    
    `status`
    
    - is **required**
    - type: `boolean`
    
    ##### status Type
    
    `boolean`
    
    ### Output Example
    
    ```json
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ## 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 |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    
    | Property  | Type    | Required |
    | --------- | ------- | -------- |
    | `ee_name` | string  | Optional |
    | `eeid`    | integer | Optional |
    
    #### ee_name
    
    `ee_name`
    
    - type: `string`
    
    ##### ee_name Type
    
    `string`
    
    #### eeid
    
    - type: `integer`
    
    ##### eeid Type
    
    `integer`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ### Ubus CLI Example
    
    ```
    
    ubus call swmodules du_list {"eeid":6,"ee_name":"quis exercitation nisi ullamco"}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### JSONRPC Example
    
    ```json
    
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
    
      "params": ["<SID>", "swmodules", "du_list", { "eeid": 6, "ee_name": "quis exercitation nisi ullamco" }]
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    #### output
    
    `output`
    
    - is optional
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ##### output Type
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ```json
    {
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        {
          "type": "object",
          "properties": {
    
            "deployment_unit": {
    
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
    
                    "du_name": {
    
                    "ee_name": {
    
                    "eeid": {
    
                      "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"]
    
    Vivek Dutta's avatar
    Vivek Dutta committed
            }
    
          }
        },
        {
          "type": "object",
          "properties": {
    
            "deployment_unit": {
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        }
      ],
    
      "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"
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    }
    ```
    
    ### Output Example
    
    ```json
    {
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        {
    
          "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": [] }
    
    Vivek Dutta's avatar
    Vivek Dutta committed
      ]
    }
    ```
    
    ## 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     |
    
    #### du_name
    
    `du_name`
    
    - is **required**
    - type: `string`
    
    ##### du_name Type
    
    `string`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    #### ee_name
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    `ee_name`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    - is optional
    - type: `string`
    
    
    ##### ee_name Type
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    `string`
    
    
    #### eeid
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    - is optional
    - type: `integer`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    ##### eeid Type
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    `integer`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ### Ubus CLI Example
    
    ```
    
    ubus call swmodules du_uninstall {"du_name":"est eiusmod culpa commodo","ee_name":"dolor ad","eeid":8}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### 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 }
    
    Vivek Dutta's avatar
    Vivek Dutta committed
      ]
    }
    ```
    
    #### 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** |
    
    #### ee_name
    
    `ee_name`
    
    - type: `string`
    
    ##### ee_name Type
    
    `string`
    
    #### eeid
    
    - type: `integer`
    
    ##### eeid Type
    
    `integer`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### 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"}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### 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"
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        }
      ]
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    
    | Property | Type    | Required     |
    | -------- | ------- | ------------ |
    | `status` | boolean | **Required** |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### status
    
    `status`
    
    - is **required**
    - type: `boolean`
    
    ##### status Type
    
    `boolean`
    
    ### Output Example
    
    ```json
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    
    ## ee_list
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ### Get list of available environments for software modules
    
    
    `ee_list`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    - type: `Method`
    
    
    ### ee_list Type
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    `object` with following properties:
    
    | Property | Type   | Required     |
    | -------- | ------ | ------------ |
    | `input`  | object | Optional     |
    
    | `output` |        | **Required** |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Ubus CLI Example
    
    ```
    
    ubus call swmodules ee_list {}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### JSONRPC Example
    
    ```json
    
    { "jsonrpc": "2.0", "id": 0, "method": "call", "params": ["<SID>", "swmodules", "ee_list", {}] }
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    #### output
    
    `output`
    
    - is **required**
    
    - type: complex
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ##### output Type
    
    
    Unknown type ``.
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ```json
    {
    
      "oneof": [
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        {
          "type": "object",
          "properties": {
    
            "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"
                  ]
                }
              ]
    
    Vivek Dutta's avatar
    Vivek Dutta committed
            }
    
          }
        },
        {
          "type": "object",
          "properties": {
            "environment": {
              "type": "array",
              "items": []
            }
          }
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        }
      ],
    
      "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"
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    }
    ```
    
    ### Output Example
    
    ```json
    {
    
      "oneof": [
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        {
    
          "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": [] }
    
    ## ee_set_state
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    ### Change the current state of the Execution Environment
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    `ee_set_state`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    - type: `Method`
    
    
    ### ee_set_state Type
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    `object` with following properties:
    
    
    | Property | Type   | Required     |
    | -------- | ------ | ------------ |
    | `input`  | object | **Required** |
    | `output` | object | Optional     |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    #### input
    
    `input`
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    
    | Property  | Type    | Required     |
    | --------- | ------- | ------------ |
    | `ee_name` | string  | Optional     |
    | `eeid`    | integer | Optional     |
    | `state`   | string  | **Required** |
    
    #### ee_name
    
    `ee_name`
    
    ##### ee_name Type
    
    #### eeid
    
    - is optional
    - type: `integer`
    
    ##### eeid Type
    
    `integer`
    
    - type: reference
    
    `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 |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ### Ubus CLI Example
    
    ```
    
    ubus call swmodules ee_set_state {"state":"stop","eeid":-51049577,"ee_name":"id officia consectetur nostrud"}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### JSONRPC Example
    
    ```json
    
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
      "params": [
        "<SID>",
        "swmodules",
    
        "ee_set_state",
        { "state": "stop", "eeid": -51049577, "ee_name": "id officia consectetur nostrud" }
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    #### 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`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    - is **required**
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    { "status": true, "reason": "dolore adipisicing Ut in" }
    
    ```
    
    ## 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 |
    | --------- | ------- | -------- |