twc-cli 2.10.0__py3-none-any.whl → 2.10.1__py3-none-any.whl
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.
- CHANGELOG.md +6 -0
- twc/__version__.py +1 -1
- twc/commands/database.py +17 -3
- twc/vars.py +10 -0
- {twc_cli-2.10.0.dist-info → twc_cli-2.10.1.dist-info}/METADATA +1 -1
- {twc_cli-2.10.0.dist-info → twc_cli-2.10.1.dist-info}/RECORD +9 -9
- {twc_cli-2.10.0.dist-info → twc_cli-2.10.1.dist-info}/COPYING +0 -0
- {twc_cli-2.10.0.dist-info → twc_cli-2.10.1.dist-info}/WHEEL +0 -0
- {twc_cli-2.10.0.dist-info → twc_cli-2.10.1.dist-info}/entry_points.txt +0 -0
CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
В этом файле описаны все значимые изменения в Timeweb Cloud CLI. В выпусках мы придерживается правил [семантического версионирования](https://semver.org/lang/ru/).
|
|
4
4
|
|
|
5
|
+
# Версия 2.10.1 (2025.03.25)
|
|
6
|
+
|
|
7
|
+
## Исправлено
|
|
8
|
+
|
|
9
|
+
- Исправлена ошибка получения публичного IP при создании кластера СУБД.
|
|
10
|
+
|
|
5
11
|
# Версия 2.10.0 (2025.03.24)
|
|
6
12
|
|
|
7
13
|
## Добавлено
|
twc/__version__.py
CHANGED
twc/commands/database.py
CHANGED
|
@@ -15,6 +15,7 @@ from twc import fmt
|
|
|
15
15
|
from twc.typerx import TyperAlias
|
|
16
16
|
from twc.api import ServiceRegion, MySQLAuthPlugin, BackupInterval
|
|
17
17
|
from twc.apiwrap import create_client
|
|
18
|
+
from twc.vars import REGION_ZONE_MAP
|
|
18
19
|
from twc.utils import merge_dicts
|
|
19
20
|
from .common import (
|
|
20
21
|
verbose_option,
|
|
@@ -24,6 +25,7 @@ from .common import (
|
|
|
24
25
|
yes_option,
|
|
25
26
|
output_format_option,
|
|
26
27
|
load_from_config_callback,
|
|
28
|
+
zone_option,
|
|
27
29
|
)
|
|
28
30
|
|
|
29
31
|
|
|
@@ -277,6 +279,7 @@ def database_create(
|
|
|
277
279
|
config: Optional[Path] = config_option,
|
|
278
280
|
profile: Optional[str] = profile_option,
|
|
279
281
|
output_format: Optional[str] = output_format_option,
|
|
282
|
+
availability_zone: Optional[str] = zone_option,
|
|
280
283
|
preset_id: int = typer.Option(..., help="Database configuration preset."),
|
|
281
284
|
dbms: str = typer.Option(
|
|
282
285
|
...,
|
|
@@ -408,10 +411,21 @@ def database_create(
|
|
|
408
411
|
except ValueError:
|
|
409
412
|
sys.exit(f"Error: '{public_ip}' is not valid IPv4 address.")
|
|
410
413
|
else:
|
|
411
|
-
#
|
|
412
|
-
# correct availability zone. This is an official dirty hack.
|
|
414
|
+
# Get new public IPv4 address.
|
|
413
415
|
if no_public_ip is False:
|
|
414
|
-
|
|
416
|
+
zone = None
|
|
417
|
+
if preset_id and not availability_zone:
|
|
418
|
+
for preset in client.get_database_presets().json()[
|
|
419
|
+
"databases_presets"
|
|
420
|
+
]:
|
|
421
|
+
if preset["id"] == preset_id:
|
|
422
|
+
zone = REGION_ZONE_MAP[preset["location"]]
|
|
423
|
+
if availability_zone:
|
|
424
|
+
zone = availability_zone
|
|
425
|
+
ip = client.create_floating_ip(availability_zone=zone).json()[
|
|
426
|
+
"ip"
|
|
427
|
+
]["ip"]
|
|
428
|
+
payload["network"]["floating_ip"] = ip
|
|
415
429
|
|
|
416
430
|
if login:
|
|
417
431
|
print(
|
twc/vars.py
CHANGED
|
@@ -20,3 +20,13 @@ ZONES_WITH_LAN = [
|
|
|
20
20
|
"gdn-1",
|
|
21
21
|
"fra-1",
|
|
22
22
|
]
|
|
23
|
+
# The default availability zones per regions.
|
|
24
|
+
REGION_ZONE_MAP = {
|
|
25
|
+
"ru-1": "spb-3",
|
|
26
|
+
"ru-2": "nsk-1",
|
|
27
|
+
"ru-3": "msk-1",
|
|
28
|
+
"kz-1": "ala-1",
|
|
29
|
+
"pl-1": "gdn-1",
|
|
30
|
+
"nl-1": "ams-1",
|
|
31
|
+
"de-1": "fra-1",
|
|
32
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
CHANGELOG.md,sha256=
|
|
1
|
+
CHANGELOG.md,sha256=Qs4nN5qu8rQUqUgHQoGBQThGm0k5BaTLOx6BE6NiXWY,29824
|
|
2
2
|
COPYING,sha256=fpJLxZS_kHr_659xkpmqEtqHeZp6lQR9CmKCwnYbsmE,1089
|
|
3
3
|
twc/__init__.py,sha256=NwPAMNw3NuHdWGQvWS9_lromVF6VM194oVOipojfJns,113
|
|
4
4
|
twc/__main__.py,sha256=ADHceaQUzgLmvhYHvb5O8urdJWj5IcEHLpTQkSExiD8,2468
|
|
5
|
-
twc/__version__.py,sha256=
|
|
5
|
+
twc/__version__.py,sha256=8icMDOUZhpUZ9qC5kE9GWifcKzo2RYQElI1jYfMVJCs,443
|
|
6
6
|
twc/api/__init__.py,sha256=SXew0Fe51M7nRBNQaaLRH4NjnRHkQUn7J26OCkQsftA,128
|
|
7
7
|
twc/api/base.py,sha256=QRefnIgmlbz8n37GLBKeAK1AtzkcNo1IFjZgHDDECJ4,7912
|
|
8
8
|
twc/api/client.py,sha256=T74KLeKHyAxzKHkpdNF-VOkfiAwnu7us61xzPosV5_o,64366
|
|
@@ -14,7 +14,7 @@ twc/commands/account.py,sha256=6q9ri02oFbUUZuqNVXO-uHOX45B4ELJlPjyfVaEL5Qw,5960
|
|
|
14
14
|
twc/commands/balancer.py,sha256=QAouc74ZT5go11gB1vjjfYtd1luTmWrfpACPwokZ5sU,20278
|
|
15
15
|
twc/commands/common.py,sha256=Wph8cVogUNNvc456SQrASb7mv7G88I8ETwHgISVjLQQ,8282
|
|
16
16
|
twc/commands/config.py,sha256=xHNEZVmM60c9dApLfNsj78sXZk6VsFwPdVIHO9r8xks,8802
|
|
17
|
-
twc/commands/database.py,sha256=
|
|
17
|
+
twc/commands/database.py,sha256=NOi5b-DGYgbbN7bPrsJt0wKTJBzrfKUPwltVx8YGsgU,31953
|
|
18
18
|
twc/commands/domain.py,sha256=BIg5k0TDQ-iWnhjuAHaWlZBB0bfaZgqZ2EWZGk3BICA,17154
|
|
19
19
|
twc/commands/firewall.py,sha256=KNolqbi2rsppOZwbs_j3yoZQt-0wKbj1JPGiZdfGxDE,27439
|
|
20
20
|
twc/commands/floating_ip.py,sha256=G9nD5BbHCZcuytbzeneDJWQDhd8c8WRtq9pAfwI9m7E,8747
|
|
@@ -28,9 +28,9 @@ twc/commands/vpc.py,sha256=SAht6UD17mU0d_AZY6W34VEYs7CqUsS2iDakPFxAFQU,8876
|
|
|
28
28
|
twc/fmt.py,sha256=nbuYZ8nVabYDwCmZqnL3-c6Tmri4B-R_sTCkG6sdfeI,7171
|
|
29
29
|
twc/typerx.py,sha256=AZ6BgTQvlrZYfKVYd9YqRNQnAR2XuyqImz4rf6di6f4,6737
|
|
30
30
|
twc/utils.py,sha256=uWizyUC4dHLwtk50q4Sub3zOvnVESfHKBbXYwk5t71w,651
|
|
31
|
-
twc/vars.py,sha256=
|
|
32
|
-
twc_cli-2.10.
|
|
33
|
-
twc_cli-2.10.
|
|
34
|
-
twc_cli-2.10.
|
|
35
|
-
twc_cli-2.10.
|
|
36
|
-
twc_cli-2.10.
|
|
31
|
+
twc/vars.py,sha256=AHZEwtQ_BQbnP0n7RXJ-qhqeKPQ_FPc8SDgg6osR5uU,822
|
|
32
|
+
twc_cli-2.10.1.dist-info/COPYING,sha256=fpJLxZS_kHr_659xkpmqEtqHeZp6lQR9CmKCwnYbsmE,1089
|
|
33
|
+
twc_cli-2.10.1.dist-info/METADATA,sha256=-BCPh3qtm2gn6edv2ih7nODdb0M0n8k8LMz2sGc5Dbs,2653
|
|
34
|
+
twc_cli-2.10.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
35
|
+
twc_cli-2.10.1.dist-info/entry_points.txt,sha256=tmTaVRhm8BkNrXC_9XJMum7O9wFVOvkXcBetxmahWvE,40
|
|
36
|
+
twc_cli-2.10.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|