twc-cli 2.9.0__tar.gz → 2.9.2__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.
Potentially problematic release.
This version of twc-cli might be problematic. Click here for more details.
- {twc_cli-2.9.0 → twc_cli-2.9.2}/CHANGELOG.md +12 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/PKG-INFO +1 -1
- {twc_cli-2.9.0 → twc_cli-2.9.2}/pyproject.toml +1 -1
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/__version__.py +1 -1
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/api/types.py +1 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/config.py +1 -1
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/server.py +10 -7
- {twc_cli-2.9.0 → twc_cli-2.9.2}/COPYING +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/README.md +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/__init__.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/__main__.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/api/__init__.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/api/base.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/api/client.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/api/exceptions.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/apiwrap.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/__init__.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/account.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/balancer.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/common.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/database.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/domain.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/firewall.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/floating_ip.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/image.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/kubernetes.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/project.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/ssh_key.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/storage.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/commands/vpc.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/fmt.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/typerx.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/utils.py +0 -0
- {twc_cli-2.9.0 → twc_cli-2.9.2}/twc/vars.py +0 -0
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
В этом файле описаны все значимые изменения в Timeweb Cloud CLI. В выпусках мы придерживается правил [семантического версионирования](https://semver.org/lang/ru/).
|
|
4
4
|
|
|
5
|
+
# Версия 2.9.2 (2025.03.10)
|
|
6
|
+
|
|
7
|
+
## Исправлено
|
|
8
|
+
|
|
9
|
+
- Исправлена ошибка из-за которой на Windows не устанавливались аттрибуты накнфигурационный файл.
|
|
10
|
+
|
|
11
|
+
# Версия 2.9.1 (2025.03.07)
|
|
12
|
+
|
|
13
|
+
## Исправлено
|
|
14
|
+
|
|
15
|
+
- Исправлена ошибка в реализации опции `--gpu` в `twc server create`.
|
|
16
|
+
|
|
5
17
|
# Версия 2.9.0 (2025.03.06)
|
|
6
18
|
|
|
7
19
|
## Добавлено
|
|
@@ -38,7 +38,7 @@ def write_to_file(data: dict, filepath: Path) -> None:
|
|
|
38
38
|
if os.name == "nt":
|
|
39
39
|
hidden_file_attr = 0x02
|
|
40
40
|
ctypes.windll.kernel32.SetFileAttributesW(
|
|
41
|
-
filepath, hidden_file_attr
|
|
41
|
+
str(filepath), hidden_file_attr
|
|
42
42
|
)
|
|
43
43
|
print(f"Done! Configuration is saved in {filepath}")
|
|
44
44
|
sys.exit(0)
|
|
@@ -508,7 +508,7 @@ def server_create(
|
|
|
508
508
|
None,
|
|
509
509
|
help="Cloud Server configuration preset ID. "
|
|
510
510
|
"NOTE: This argument is mutually exclusive with arguments: "
|
|
511
|
-
"['--cpu', '--ram', '--disk', '--
|
|
511
|
+
"['--cpu', '--ram', '--disk', '--gpu'].",
|
|
512
512
|
),
|
|
513
513
|
configurator_id: int = typer.Option(
|
|
514
514
|
None, help="ID of configuration constraints set."
|
|
@@ -518,7 +518,7 @@ def server_create(
|
|
|
518
518
|
"--type",
|
|
519
519
|
help="Cloud Server type. "
|
|
520
520
|
"Servers with GPU always is 'premium'. "
|
|
521
|
-
"This option will be ignored if '--
|
|
521
|
+
"This option will be ignored if '--gpu' or '--preset-id' is set.",
|
|
522
522
|
),
|
|
523
523
|
cpu: int = typer.Option(None, help="Number of vCPUs."),
|
|
524
524
|
ram: str = typer.Option(
|
|
@@ -527,7 +527,8 @@ def server_create(
|
|
|
527
527
|
disk: str = typer.Option(
|
|
528
528
|
None, metavar="SIZE", help="System disk size, e.g. 10240M, 10G."
|
|
529
529
|
),
|
|
530
|
-
gpus: Optional[int] = typer.Option(
|
|
530
|
+
gpus: Optional[int] = typer.Option(None, min=0, max=4, hidden=True),
|
|
531
|
+
gpu: Optional[int] = typer.Option(
|
|
531
532
|
None,
|
|
532
533
|
min=0,
|
|
533
534
|
max=4,
|
|
@@ -618,6 +619,8 @@ def server_create(
|
|
|
618
619
|
|
|
619
620
|
instance_kind = instance_kind.value
|
|
620
621
|
if gpus:
|
|
622
|
+
gpu = gpus
|
|
623
|
+
if gpu:
|
|
621
624
|
instance_kind = "gpu"
|
|
622
625
|
|
|
623
626
|
# Check availability zone
|
|
@@ -658,10 +661,10 @@ def server_create(
|
|
|
658
661
|
payload["network"]["floating_ip"] = "create_ip"
|
|
659
662
|
|
|
660
663
|
# Set server configuration parameters
|
|
661
|
-
if preset_id and (cpu or ram or disk or
|
|
664
|
+
if preset_id and (cpu or ram or disk or gpu):
|
|
662
665
|
raise UsageError(
|
|
663
666
|
"'--preset-id' is mutually exclusive with: "
|
|
664
|
-
+ "['--cpu', '--ram', '--disk', '--
|
|
667
|
+
+ "['--cpu', '--ram', '--disk', '--gpu']."
|
|
665
668
|
)
|
|
666
669
|
if not preset_id and not (cpu or ram or disk):
|
|
667
670
|
raise UsageError(
|
|
@@ -684,8 +687,8 @@ def server_create(
|
|
|
684
687
|
"ram": validate_ram(requirements, size_to_mb(ram)),
|
|
685
688
|
"disk": validate_disk(requirements, size_to_mb(disk)),
|
|
686
689
|
}
|
|
687
|
-
if
|
|
688
|
-
payload["configuration"]["
|
|
690
|
+
if gpu:
|
|
691
|
+
payload["configuration"]["gpu"] = gpu
|
|
689
692
|
if bandwidth:
|
|
690
693
|
payload["bandwidth"] = validate_bandwidth(requirements, bandwidth)
|
|
691
694
|
else:
|
|
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
|
|
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
|