Skip to content

Commit 20ba423

Browse files
committed
add admin workload docs
1 parent f1c0924 commit 20ba423

File tree

1 file changed

+73
-7
lines changed

1 file changed

+73
-7
lines changed

docs/manual/api.md

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ so `used = user_used + system`, while `system` is only the amount of resourced r
8484
| `zos.storage.pools` | - |`[]Pool`|
8585

8686
List all node pools with their types, size and used space
87-
where
87+
88+
Where
8889

8990
```json
9091
Pool {
@@ -151,7 +152,7 @@ it means it can act like an access node to user private networks
151152

152153
## Admin
153154

154-
The next set of commands are ONLY possible to be called by the `farmer` only.
155+
The next set of commands are ONLY possible to be called by the `farmer` owning the node.
155156

156157
### Reboot Node
157158

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

166167
| command |body| return|
167168
|---|---|---|
168-
| `zos.admin.reboot` | string | - |
169+
| `zos.admin.restart` | string | - |
169170

170171
Restarts a service running on the node
171172

173+
### Restart All Services
174+
175+
| command |body| return|
176+
|---|---|---|
177+
| `zos.admin.restart_all` | - | - |
178+
179+
Restarts all zinit services running on the node
180+
181+
### Show Logs
182+
183+
| command |body| return|
184+
|---|---|---|
185+
| `zos.admin.show_logs` | int | - |
186+
187+
Shows a number of lines of zinit logs
188+
189+
### Show Resolve
190+
191+
| command |body| return|
192+
|---|---|---|
193+
| `zos.admin.show_resolve` | int | - |
194+
195+
Shows the content of /etc/resolv.conf
196+
197+
### Show Open Connections
198+
199+
| command |body| return|
200+
|---|---|---|
201+
| `zos.admin.show_open_connections` | - | - |
202+
203+
Shows information about all open connections in the node
204+
205+
### Stop Workload
206+
207+
| command |body| return|
208+
|---|---|---|
209+
| `zos.admin.Stop` | `args` | - |
210+
211+
Where
212+
213+
```json
214+
args {
215+
"twin_id": "uint32",
216+
"workload_id": "uint64",
217+
}
218+
```
219+
220+
Stops a workload
221+
222+
### Resume Workload
223+
224+
| command |body| return|
225+
|---|---|---|
226+
| `zos.admin.resume` | `args` | - |
227+
228+
Where
229+
230+
```json
231+
args {
232+
"twin_id": "uint32",
233+
"workload_id": "uint64",
234+
}
235+
```
236+
237+
Resumes a stopped workload
238+
172239
### List Physical Interfaces
173240

174241
| command |body| return|
175242
|---|---|---|
176-
| `zos.network.admin.interfaces` | - |`map[string]Interface` |
243+
| `zos.admin.interfaces` | - |`map[string]Interface` |
177244

178245
Where
179246

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

192259
| command |body| return|
193260
|---|---|---|
194-
| `zos.network.admin.get_public_nic` | - |`ExitDevice` |
261+
| `zos.admin.get_public_nic` | - |`ExitDevice` |
195262

196263
Where
197264

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

210277
| command |body| return|
211278
|---|---|---|
212-
| `zos.network.admin.set_public_nic` | `name` |- |
279+
| `zos.admin.set_public_nic` | `name` |- |
213280

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

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

242-
243309
Where
244310

245311
```json

0 commit comments

Comments
 (0)