Skip to content

Commit

Permalink
add admin workload docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Eslam-Nawara committed Jan 2, 2025
1 parent f1c0924 commit 20ba423
Showing 1 changed file with 73 additions and 7 deletions.
80 changes: 73 additions & 7 deletions docs/manual/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ so `used = user_used + system`, while `system` is only the amount of resourced r
| `zos.storage.pools` | - |`[]Pool`|

List all node pools with their types, size and used space
where

Where

```json
Pool {
Expand Down Expand Up @@ -151,7 +152,7 @@ it means it can act like an access node to user private networks

## Admin

The next set of commands are ONLY possible to be called by the `farmer` only.
The next set of commands are ONLY possible to be called by the `farmer` owning the node.

### Reboot Node

Expand All @@ -165,15 +166,81 @@ Stops all services then reboot the node

| command |body| return|
|---|---|---|
| `zos.admin.reboot` | string | - |
| `zos.admin.restart` | string | - |

Restarts a service running on the node

### Restart All Services

| command |body| return|
|---|---|---|
| `zos.admin.restart_all` | - | - |

Restarts all zinit services running on the node

### Show Logs

| command |body| return|
|---|---|---|
| `zos.admin.show_logs` | int | - |

Shows a number of lines of zinit logs

### Show Resolve

| command |body| return|
|---|---|---|
| `zos.admin.show_resolve` | int | - |

Shows the content of /etc/resolv.conf

### Show Open Connections

| command |body| return|
|---|---|---|
| `zos.admin.show_open_connections` | - | - |

Shows information about all open connections in the node

### Stop Workload

| command |body| return|
|---|---|---|
| `zos.admin.Stop` | `args` | - |

Where

```json
args {
"twin_id": "uint32",
"workload_id": "uint64",
}
```

Stops a workload

### Resume Workload

| command |body| return|
|---|---|---|
| `zos.admin.resume` | `args` | - |

Where

```json
args {
"twin_id": "uint32",
"workload_id": "uint64",
}
```

Resumes a stopped workload

### List Physical Interfaces

| command |body| return|
|---|---|---|
| `zos.network.admin.interfaces` | - |`map[string]Interface` |
| `zos.admin.interfaces` | - |`map[string]Interface` |

Where

Expand All @@ -191,7 +258,7 @@ Those interfaces then can be used as an input to `set_public_nic`

| command |body| return|
|---|---|---|
| `zos.network.admin.get_public_nic` | - |`ExitDevice` |
| `zos.admin.get_public_nic` | - |`ExitDevice` |

Where

Expand All @@ -209,7 +276,7 @@ returns the interface used by public traffic (for user workloads)

| command |body| return|
|---|---|---|
| `zos.network.admin.set_public_nic` | `name` |- |
| `zos.admin.set_public_nic` | `name` |- |

name must be one of (free) names returned by `zos.network.admin.interfaces`

Expand Down Expand Up @@ -239,7 +306,6 @@ name must be one of (free) names returned by `zos.network.admin.interfaces`
|---|---|---|
| `zos.system.node_features_get` | - |`[]NodeFeature` |


Where

```json
Expand Down

0 comments on commit 20ba423

Please sign in to comment.