Skip to content
Snippets Groups Projects
swmodules.md 20.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • `string`
    
    #### service_name
    
    `service_name`
    
    - is **required**
    - type: `string`
    
    ##### service_name Type
    
    `string`
    
    #### state
    
    `state`
    
    - is **required**
    - type: `boolean`
    
    ##### state Type
    
    `boolean`
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ### Ubus CLI Example
    
    ```
    
    ubus call swmodules eu_activate {"service_name":"culpa","state":true,"eid":1,"environment":"enim dolore occaecat veniam labore"}
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    ```
    
    ### JSONRPC Example
    
    ```json
    
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
      "params": [
        "<SID>",
        "swmodules",
        "eu_activate",
        { "service_name": "culpa", "state": true, "eid": 1, "environment": "enim dolore occaecat veniam labore" }
      ]
    }
    
    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 |
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    - is optional
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    
    ### Output Example
    
    ```json
    { "status": true }
    ```
    
    ## 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 |
    | ------------- | ------- | -------- |
    | `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 CLI Example
    
    ```
    ubus call swmodules eu_list {"eid":2,"environment":"eiusmod"}
    ```
    
    ### JSONRPC Example
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    
    ```json
    {
    
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
      "params": ["<SID>", "swmodules", "eu_list", { "eid": 2, "environment": "eiusmod" }]
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: complex
    
    ##### output Type
    
    Unknown type ``.
    
    ```json
    {
      "oneof": [
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        {
          "type": "object",
          "properties": {
    
            "execution_unit": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "command": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "config": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "environment": {
                      "type": "string"
                    },
                    "eid": {
                      "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": [
                    "name",
                    "command",
                    "config",
                    "version",
                    "description",
                    "environment",
                    "euid",
                    "disk_space",
                    "memory_space",
                    "vendor"
                  ]
                }
              ]
    
    Vivek Dutta's avatar
    Vivek Dutta committed
            }
    
          }
        },
        {
          "type": "object",
          "properties": {
            "execution_unit": {
              "type": "array",
              "items": []
            }
          }
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        }
      ],
    
      "out": "{\"oneof\":[{\"execution_unit\":[{\"name\":\"in est aliqua aliquip\",\"command\":\"proident et \",\"config\":\"reprehenderit nisi qui esse\",\"version\":\"deserunt quis do qui laborum\",\"description\":\"ipsum fugiat non\",\"environment\":\"enim\",\"euid\":18216158,\"disk_space\":13070620,\"memory_space\":67344135,\"vendor\":\"consequat\",\"state\":\"enim sed dolore est elit\",\"eid\":7}]},{\"execution_unit\":[]}]}",
      "simpletype": "complex"
    
    Vivek Dutta's avatar
    Vivek Dutta committed
    }
    ```
    
    ### Output Example
    
    ```json
    {
    
    Vivek Dutta's avatar
    Vivek Dutta committed
        {
    
          "execution_unit": [
            {
              "name": "in est aliqua aliquip",
              "command": "proident et ",
              "config": "reprehenderit nisi qui esse",
              "version": "deserunt quis do qui laborum",
              "description": "ipsum fugiat non",
              "environment": "enim",
              "euid": 18216158,
              "disk_space": 13070620,
              "memory_space": 67344135,
              "vendor": "consequat",
              "state": "enim sed dolore est elit",
              "eid": 7
            }
          ]
        },
        { "execution_unit": [] }