twc-cli 1.3.0__tar.gz → 1.3.1__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-1.3.0 → twc_cli-1.3.1}/CHANGELOG.md +11 -1
- {twc_cli-1.3.0 → twc_cli-1.3.1}/PKG-INFO +1 -1
- {twc_cli-1.3.0 → twc_cli-1.3.1}/pyproject.toml +1 -1
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/__version__.py +1 -1
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/config.py +13 -4
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/storage.py +6 -1
- {twc_cli-1.3.0 → twc_cli-1.3.1}/COPYING +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/README.md +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/__init__.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/__main__.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/api/__init__.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/api/client.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/api/exceptions.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/click_ext.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/__init__.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/account.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/database.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/image.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/project.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/server.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/commands/ssh_key.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/fmt.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/utils.py +0 -0
- {twc_cli-1.3.0 → twc_cli-1.3.1}/twc/vars.py +0 -0
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
В этом файле описаны все значимые изменения в Timeweb Cloud CLI. В выпусках мы придерживается правил [семантического версионирования](https://semver.org/lang/ru/).
|
|
4
4
|
|
|
5
|
+
# Версия 1.3.1 (2023.04.13)
|
|
6
|
+
|
|
7
|
+
Изменено:
|
|
8
|
+
|
|
9
|
+
- В команде `twc s3 mb` опция `--preset-id` теперь необязательная. Будет выбран минимальный пресет.
|
|
10
|
+
|
|
11
|
+
Исправлено:
|
|
12
|
+
|
|
13
|
+
- Исправлена ошибка при попытке создать дополнительный профиль через `twc config`.
|
|
14
|
+
|
|
5
15
|
# Версия 1.3.0 (2023.04.13)
|
|
6
16
|
|
|
7
17
|
Добавлено:
|
|
8
18
|
|
|
9
|
-
- Добавлена команда `twc storage` (алиас `twc s3`) для управления бакетами в объектном хранилище Timeweb Cloud. Доступны базовые операции с бакетами. Также реализованы субкоманды для работы с доменами и пользователями хранилища. Обратите внимание, что в twc не планируется добавлять реализацию S3-клиента, пользуйтесь любым совместимым клиентом, например, [s3cmd](https://s3tools.org/s3cmd) или [rclone](https://rclone.org/), команда `twc s3 genconfig` позволит сгенерировать конфигурационный файл для этих утилит (см. документацию).
|
|
19
|
+
- Добавлена команда `twc storage` (алиас `twc s3`) для управления бакетами в объектном хранилище Timeweb Cloud. Доступны базовые операции с бакетами. Также реализованы субкоманды для работы с доменами и пользователями хранилища. Обратите внимание, что в twc не планируется добавлять реализацию S3-клиента, пользуйтесь любым совместимым клиентом, например, [s3cmd](https://s3tools.org/s3cmd) или [rclone](https://rclone.org/), команда `twc s3 genconfig` позволит сгенерировать конфигурационный файл для этих утилит (см. [документацию](docs/ru/README.md#получение-конфигурации-для-s3-клиентов)).
|
|
10
20
|
- Добавлены субкоманды для `twc config`. Теперь можно: сделать дамп настроек CLI (`twc config dump`), изменять настройки без ручного редактирования файла (`twc config set`), получить путь до файла (`twc config file`), открыть файл в редакторе по умолчанию (`twc config edit`).
|
|
11
21
|
|
|
12
22
|
Изменено:
|
|
@@ -46,10 +46,19 @@ def make_config(filepath: str = get_default_config_file()):
|
|
|
46
46
|
current_config = load_config()
|
|
47
47
|
profile = click.prompt("Enter profile name", default="default")
|
|
48
48
|
token = click.prompt(f"Enter API token for '{profile}'")
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
try:
|
|
50
|
+
# Edit existing profile
|
|
51
|
+
current_config[profile] = utils.merge_dicts(
|
|
52
|
+
current_config[profile],
|
|
53
|
+
{"token": token},
|
|
54
|
+
)
|
|
55
|
+
except KeyError:
|
|
56
|
+
# Add new profile
|
|
57
|
+
current_config[profile] = {} # init new config section
|
|
58
|
+
current_config[profile] = utils.merge_dicts(
|
|
59
|
+
current_config[profile],
|
|
60
|
+
{"token": token},
|
|
61
|
+
)
|
|
53
62
|
write_to_file(current_config, filepath)
|
|
54
63
|
else:
|
|
55
64
|
sys.exit("Aborted!")
|
|
@@ -226,7 +226,7 @@ def storage_list_presets(
|
|
|
226
226
|
@storage.command("mb", help="Make bucket.")
|
|
227
227
|
@options(GLOBAL_OPTIONS)
|
|
228
228
|
@options(OUTPUT_FORMAT_OPTION)
|
|
229
|
-
@click.option("--preset-id", type=int,
|
|
229
|
+
@click.option("--preset-id", type=int, help="Bucket preset ID.")
|
|
230
230
|
@click.option(
|
|
231
231
|
"--project-id",
|
|
232
232
|
type=int,
|
|
@@ -257,6 +257,11 @@ def storage_mb(
|
|
|
257
257
|
# pylint: disable=too-many-locals
|
|
258
258
|
|
|
259
259
|
client = create_client(config, profile)
|
|
260
|
+
|
|
261
|
+
if not preset_id:
|
|
262
|
+
# Select minimal preset
|
|
263
|
+
preset_id = 389 # 10G disk
|
|
264
|
+
|
|
260
265
|
is_public = False
|
|
261
266
|
if bucket_type == "public":
|
|
262
267
|
is_public = True
|
|
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
|