unikraft-cloud-plugin-sandbox-api 1.1.0.dev17__tar.gz → 1.1.1.dev12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/PKG-INFO +1 -1
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/pyproject.toml +1 -1
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/_meta.py +3 -3
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/commands_gen.py +16 -0
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/models_gen.py +95 -2
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/LICENSE.md +0 -0
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/README.md +0 -0
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/__init__.py +0 -0
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/fs_gen.py +0 -0
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/py.typed +0 -0
- {unikraft_cloud_plugin_sandbox_api-1.1.0.dev17 → unikraft_cloud_plugin_sandbox_api-1.1.1.dev12}/src/unikraft_cloud_plugin_sandbox_api/transport.py +0 -0
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
# can tell a rebuild of the same sources from a change under the same version.
|
|
6
6
|
|
|
7
7
|
#: The version this package was published as.
|
|
8
|
-
VERSION = "1.1.
|
|
8
|
+
VERSION = "1.1.1.dev12"
|
|
9
9
|
|
|
10
10
|
#: The oldest unikraft-cloud SDK whose ApiClient is a transport for this package.
|
|
11
11
|
SDK_MIN = "0.2.0"
|
|
12
12
|
|
|
13
13
|
#: SHA-256 of the OpenAPI specification.
|
|
14
|
-
SPEC_HASH = "
|
|
14
|
+
SPEC_HASH = "cfae5b85e8cd454a69654af5d529bf2fda72cf3fd56422e2fe843636b8457843"
|
|
15
15
|
|
|
16
16
|
#: SHA-256 over the generator's templates and static files.
|
|
17
17
|
TEMPLATES_HASH = "5efe373fc719c482bc42cc6ff89c27852a6bfef78c9e6d841a1f21eab2f97859"
|
|
18
18
|
|
|
19
19
|
#: SHA-256 over the generation configuration: the SDK floor and the generator.
|
|
20
|
-
CONFIG_HASH = "
|
|
20
|
+
CONFIG_HASH = "15795a51671a13fcc063368040d9d013ebbf5ee0a5053750f3d6ed8d8c67e31b"
|
|
@@ -106,6 +106,22 @@ class CommandsApi:
|
|
|
106
106
|
**options,
|
|
107
107
|
)
|
|
108
108
|
|
|
109
|
+
async def resize_command_terminal(
|
|
110
|
+
self,
|
|
111
|
+
uuid: str,
|
|
112
|
+
*,
|
|
113
|
+
body: models.CommandResizeRequest,
|
|
114
|
+
**options: Unpack[CallOptions],
|
|
115
|
+
) -> models.EmptyResponse:
|
|
116
|
+
"""Resize Command Terminal"""
|
|
117
|
+
return await self.transport.request(
|
|
118
|
+
models.EmptyResponse,
|
|
119
|
+
method="POST",
|
|
120
|
+
path=f"/commands/{quote(uuid, safe='')}/resize",
|
|
121
|
+
body=body,
|
|
122
|
+
**options,
|
|
123
|
+
)
|
|
124
|
+
|
|
109
125
|
async def run_command(
|
|
110
126
|
self,
|
|
111
127
|
*,
|
|
@@ -105,6 +105,21 @@ class CommandLogsResponse(BaseModel):
|
|
|
105
105
|
"""The operation time in microseconds."""
|
|
106
106
|
|
|
107
107
|
|
|
108
|
+
class CommandResizeRequest(BaseModel):
|
|
109
|
+
"""The request to resize a command's terminal."""
|
|
110
|
+
|
|
111
|
+
# Fields the specification does not describe are kept rather than dropped,
|
|
112
|
+
# so a newly added one survives a round trip and does not break this client.
|
|
113
|
+
# A field the specification requires is required here too, so a request
|
|
114
|
+
# missing one fails at construction rather than at the server.
|
|
115
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
116
|
+
|
|
117
|
+
cols: int
|
|
118
|
+
"""The new width, in columns."""
|
|
119
|
+
rows: int
|
|
120
|
+
"""The new height, in rows."""
|
|
121
|
+
|
|
122
|
+
|
|
108
123
|
class CommandSignalRequest(BaseModel):
|
|
109
124
|
"""The request to send a signal to a command."""
|
|
110
125
|
|
|
@@ -194,6 +209,13 @@ class GetCommandData(BaseModel):
|
|
|
194
209
|
"""The current working directory, if supplied at startup, else null"""
|
|
195
210
|
env: dict[str, str] | None = None
|
|
196
211
|
"""Environment variables, if supplied at startup, else null"""
|
|
212
|
+
pty: bool | None = None
|
|
213
|
+
"""Whether the command runs on a pseudo-terminal."""
|
|
214
|
+
duration_ms: int | None = None
|
|
215
|
+
"""
|
|
216
|
+
Milliseconds from start to exit, or to now while the command runs. `null`
|
|
217
|
+
for a command restored from a status file written before it was recorded.
|
|
218
|
+
"""
|
|
197
219
|
exitcode: int | None = None
|
|
198
220
|
"""
|
|
199
221
|
The exit code of the command. It is `null` while the command is still
|
|
@@ -338,7 +360,7 @@ class ResponseError(BaseModel):
|
|
|
338
360
|
|
|
339
361
|
|
|
340
362
|
class RunCommandData(BaseModel):
|
|
341
|
-
"""The
|
|
363
|
+
"""The command that was started, as `GET .../{uuid}` describes it."""
|
|
342
364
|
|
|
343
365
|
# Fields the specification does not describe are kept rather than dropped,
|
|
344
366
|
# so a newly added one survives a round trip and does not break this client.
|
|
@@ -347,7 +369,33 @@ class RunCommandData(BaseModel):
|
|
|
347
369
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
348
370
|
|
|
349
371
|
uuid: str | None = None
|
|
350
|
-
"""The UUID
|
|
372
|
+
"""The UUID of the command."""
|
|
373
|
+
cmdline: CommandLineShell | CommandLineArgs | None = None
|
|
374
|
+
"""
|
|
375
|
+
The command the command was started with, in the form it was supplied in:
|
|
376
|
+
a shell command line, or an argument vector.
|
|
377
|
+
"""
|
|
378
|
+
cwd: str | None = None
|
|
379
|
+
"""The current working directory, if supplied at startup, else null"""
|
|
380
|
+
env: dict[str, str] | None = None
|
|
381
|
+
"""Environment variables, if supplied at startup, else null"""
|
|
382
|
+
pty: bool | None = None
|
|
383
|
+
"""Whether the command runs on a pseudo-terminal."""
|
|
384
|
+
duration_ms: int | None = None
|
|
385
|
+
"""
|
|
386
|
+
Milliseconds from start to exit, or to now while the command runs. `null`
|
|
387
|
+
for a command restored from a status file written before it was recorded.
|
|
388
|
+
"""
|
|
389
|
+
exitcode: int | None = None
|
|
390
|
+
"""
|
|
391
|
+
The exit code of the command. It is `null` while the command is still
|
|
392
|
+
running.
|
|
393
|
+
"""
|
|
394
|
+
logs: CommandLogsData | None = None
|
|
395
|
+
"""
|
|
396
|
+
Only with `req_timeout_s`: the output, as `GET .../logs` returns it.
|
|
397
|
+
Absent if the logs were deleted while the request waited.
|
|
398
|
+
"""
|
|
351
399
|
|
|
352
400
|
|
|
353
401
|
class RunCommandRequest(BaseModel):
|
|
@@ -370,6 +418,50 @@ class RunCommandRequest(BaseModel):
|
|
|
370
418
|
"""(OPTIONAL) Current working directory"""
|
|
371
419
|
env: dict[str, str] | None = None
|
|
372
420
|
"""(OPTIONAL) Environment variables"""
|
|
421
|
+
pty: bool | None = None
|
|
422
|
+
"""
|
|
423
|
+
(OPTIONAL) Run the command on a pseudo-terminal instead of pipes. Its
|
|
424
|
+
output, stdout and stderr merged as a terminal shows them, is served as
|
|
425
|
+
`stdout`; input fed to it is echoed by the terminal; an `eof` on stdin
|
|
426
|
+
types the terminal's end-of-input character rather than closing anything;
|
|
427
|
+
and deleting the logs hangs the terminal up, which ends most commands.
|
|
428
|
+
`TERM` is set to `xterm-256color` unless `env` provides one.
|
|
429
|
+
"""
|
|
430
|
+
cols: int | None = None
|
|
431
|
+
"""(OPTIONAL) The terminal's width in columns. Needs `pty`; 80 by default."""
|
|
432
|
+
rows: int | None = None
|
|
433
|
+
"""(OPTIONAL) The terminal's height in rows. Needs `pty`; 24 by default."""
|
|
434
|
+
stdin: str | None = None
|
|
435
|
+
"""
|
|
436
|
+
(OPTIONAL) Bytes to feed into standard input before anything else,
|
|
437
|
+
base64-encoded, exactly as a `POST .../stdin` right after the start would.
|
|
438
|
+
"""
|
|
439
|
+
stdin_eof: bool | None = None
|
|
440
|
+
"""
|
|
441
|
+
(OPTIONAL) Whether to close standard input after `stdin` (at once when
|
|
442
|
+
there is none). Defaults to `true` when `req_timeout_s` is given, since
|
|
443
|
+
nothing can be fed until the request answers, and to `false` otherwise.
|
|
444
|
+
"""
|
|
445
|
+
req_timeout_s: float | None = None
|
|
446
|
+
"""
|
|
447
|
+
(OPTIONAL) Block until the command exits or this many seconds have
|
|
448
|
+
passed, then answer with the command's state and output (`logs`). More
|
|
449
|
+
than 0 and at most 55: a proxy in front cuts a silent request at about a
|
|
450
|
+
minute. A timeout is not an error: the answer has `exitcode: null`, the
|
|
451
|
+
output so far, and the command keeps running, addressable by UUID as any
|
|
452
|
+
other. Absent: answer as soon as the command has started.
|
|
453
|
+
"""
|
|
454
|
+
logs_limit: int | None = None
|
|
455
|
+
"""
|
|
456
|
+
(OPTIONAL) With `req_timeout_s`: at most this many bytes of each stream in
|
|
457
|
+
the answer, the rest staying at `GET .../logs`. Whole streams by default.
|
|
458
|
+
"""
|
|
459
|
+
forget: bool | None = None
|
|
460
|
+
"""
|
|
461
|
+
(OPTIONAL) With `req_timeout_s`: forget the command once it has finished,
|
|
462
|
+
as `DELETE .../{uuid}` would, so that one request is the whole exchange.
|
|
463
|
+
Does nothing on a timeout, when the UUID is still needed.
|
|
464
|
+
"""
|
|
373
465
|
|
|
374
466
|
|
|
375
467
|
class RunCommandResponse(BaseModel):
|
|
@@ -451,6 +543,7 @@ for _model in (
|
|
|
451
543
|
CommandLogsRange,
|
|
452
544
|
CommandLogsRequest,
|
|
453
545
|
CommandLogsResponse,
|
|
546
|
+
CommandResizeRequest,
|
|
454
547
|
CommandSignalRequest,
|
|
455
548
|
CommandStdinRequest,
|
|
456
549
|
CommandWaitTimeoutRequest,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|