devnomads-cli 0.6.0__tar.gz → 0.7.0__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.
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/PKG-INFO +1 -1
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/devnomads_cli.egg-info/PKG-INFO +1 -1
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/dncli.py +95 -1
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/pyproject.toml +1 -1
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/LICENSE +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/README.md +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/devnomads_cli.egg-info/SOURCES.txt +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/devnomads_cli.egg-info/dependency_links.txt +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/devnomads_cli.egg-info/entry_points.txt +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/devnomads_cli.egg-info/requires.txt +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/devnomads_cli.egg-info/top_level.txt +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/setup.cfg +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_cert.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_cli.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_config.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_generate.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_generated_cli.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_helpers.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_hook.py +0 -0
- {devnomads_cli-0.6.0 → devnomads_cli-0.7.0}/tests/test_transfer.py +0 -0
|
@@ -52,7 +52,7 @@ from rich.markup import escape
|
|
|
52
52
|
from rich.table import Table
|
|
53
53
|
from typer.core import TyperGroup
|
|
54
54
|
|
|
55
|
-
__version__ = "0.
|
|
55
|
+
__version__ = "0.7.0"
|
|
56
56
|
|
|
57
57
|
# Distribution names, for reporting versions via `dncli version`.
|
|
58
58
|
CLI_PACKAGE = "devnomads-cli"
|
|
@@ -2577,6 +2577,10 @@ gen_emails_transactional = typer.Typer(
|
|
|
2577
2577
|
cls=PrefixGroup, help="Manage emails transactional.", no_args_is_help=True
|
|
2578
2578
|
)
|
|
2579
2579
|
gen_emails.add_typer(gen_emails_transactional, name="transactional")
|
|
2580
|
+
gen_servers_snapshots = typer.Typer(
|
|
2581
|
+
cls=PrefixGroup, help="Manage servers snapshots.", no_args_is_help=True
|
|
2582
|
+
)
|
|
2583
|
+
gen_servers.add_typer(gen_servers_snapshots, name="snapshots")
|
|
2580
2584
|
gen_spams_clusters = typer.Typer(
|
|
2581
2585
|
cls=PrefixGroup, help="Manage spams clusters.", no_args_is_help=True
|
|
2582
2586
|
)
|
|
@@ -4327,6 +4331,96 @@ def gen_services_servers_show(
|
|
|
4327
4331
|
)
|
|
4328
4332
|
|
|
4329
4333
|
|
|
4334
|
+
@gen_servers_snapshots.command("create")
|
|
4335
|
+
def gen_services_servers_snapshots_create(
|
|
4336
|
+
ctx: typer.Context,
|
|
4337
|
+
service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
|
|
4338
|
+
output: OutputFormat | None = _OUTPUT_OPT,
|
|
4339
|
+
columns: str | None = _COLUMNS_OPT,
|
|
4340
|
+
) -> None:
|
|
4341
|
+
"""Create a snapshot of a server."""
|
|
4342
|
+
|
|
4343
|
+
_generated_call(
|
|
4344
|
+
ctx,
|
|
4345
|
+
"POST",
|
|
4346
|
+
"/services/servers/{serviceId}/snapshots",
|
|
4347
|
+
{"serviceId": service_id},
|
|
4348
|
+
resolve="/services/servers",
|
|
4349
|
+
output=output,
|
|
4350
|
+
select=columns,
|
|
4351
|
+
)
|
|
4352
|
+
|
|
4353
|
+
|
|
4354
|
+
@gen_servers_snapshots.command("delete")
|
|
4355
|
+
def gen_services_servers_snapshots_delete(
|
|
4356
|
+
ctx: typer.Context,
|
|
4357
|
+
service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
|
|
4358
|
+
snapshot_uuid: str = typer.Argument(..., metavar="SNAPSHOT_UUID"),
|
|
4359
|
+
yes: bool = _YES_OPT,
|
|
4360
|
+
output: OutputFormat | None = _OUTPUT_OPT,
|
|
4361
|
+
columns: str | None = _COLUMNS_OPT,
|
|
4362
|
+
) -> None:
|
|
4363
|
+
"""Delete a server snapshot."""
|
|
4364
|
+
|
|
4365
|
+
_generated_call(
|
|
4366
|
+
ctx,
|
|
4367
|
+
"DELETE",
|
|
4368
|
+
"/services/servers/{serviceId}/snapshots/{snapshotUuid}",
|
|
4369
|
+
{"serviceId": service_id, "snapshotUuid": snapshot_uuid},
|
|
4370
|
+
resolve="/services/servers",
|
|
4371
|
+
confirm="Delete this server snapshot?",
|
|
4372
|
+
yes=yes,
|
|
4373
|
+
output=output,
|
|
4374
|
+
select=columns,
|
|
4375
|
+
)
|
|
4376
|
+
|
|
4377
|
+
|
|
4378
|
+
@gen_servers_snapshots.command("list")
|
|
4379
|
+
def gen_services_servers_snapshots_index(
|
|
4380
|
+
ctx: typer.Context,
|
|
4381
|
+
service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
|
|
4382
|
+
sort: str | None = _SORT_OPT,
|
|
4383
|
+
output: OutputFormat | None = _OUTPUT_OPT,
|
|
4384
|
+
columns: str | None = _COLUMNS_OPT,
|
|
4385
|
+
) -> None:
|
|
4386
|
+
"""List a server's snapshots."""
|
|
4387
|
+
|
|
4388
|
+
_generated_call(
|
|
4389
|
+
ctx,
|
|
4390
|
+
"GET",
|
|
4391
|
+
"/services/servers/{serviceId}/snapshots",
|
|
4392
|
+
{"serviceId": service_id},
|
|
4393
|
+
sort=sort,
|
|
4394
|
+
resolve="/services/servers",
|
|
4395
|
+
output=output,
|
|
4396
|
+
select=columns,
|
|
4397
|
+
)
|
|
4398
|
+
|
|
4399
|
+
|
|
4400
|
+
@gen_servers_snapshots.command("restore")
|
|
4401
|
+
def gen_services_servers_snapshots_restore(
|
|
4402
|
+
ctx: typer.Context,
|
|
4403
|
+
service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
|
|
4404
|
+
snapshot_uuid: str = typer.Argument(..., metavar="SNAPSHOT_UUID"),
|
|
4405
|
+
yes: bool = _YES_OPT,
|
|
4406
|
+
output: OutputFormat | None = _OUTPUT_OPT,
|
|
4407
|
+
columns: str | None = _COLUMNS_OPT,
|
|
4408
|
+
) -> None:
|
|
4409
|
+
"""Restore a server from a snapshot."""
|
|
4410
|
+
|
|
4411
|
+
_generated_call(
|
|
4412
|
+
ctx,
|
|
4413
|
+
"GET",
|
|
4414
|
+
"/services/servers/{serviceId}/snapshots/{snapshotUuid}/restore",
|
|
4415
|
+
{"serviceId": service_id, "snapshotUuid": snapshot_uuid},
|
|
4416
|
+
resolve="/services/servers",
|
|
4417
|
+
confirm="Restore this server from the snapshot, overwriting its current state?",
|
|
4418
|
+
yes=yes,
|
|
4419
|
+
output=output,
|
|
4420
|
+
select=columns,
|
|
4421
|
+
)
|
|
4422
|
+
|
|
4423
|
+
|
|
4330
4424
|
@gen_servers.command("state")
|
|
4331
4425
|
def gen_services_servers_state(
|
|
4332
4426
|
ctx: typer.Context,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|