twc-cli 2.11.0__py3-none-any.whl → 2.12.0__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 CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  В этом файле описаны все значимые изменения в Timeweb Cloud CLI. В выпусках мы придерживается правил [семантического версионирования](https://semver.org/lang/ru/).
4
4
 
5
+ # Версия 2.12.0 (2025.xx.xx)
6
+
7
+ ## Добавлено
8
+
9
+ - Добавлены опции `--max-connections`, `--connect-timeout`, `--client-timeout`, `--server-timeout` в команды `twc balancer create`, `twc balancer set`.
10
+ - В регионе `kz-1` для облачных серверов теперь доступен IPv6.
11
+
12
+ ## Изменено
13
+
14
+ - Стандартный ендпоинт объектного хранилища изменён с `s3.timeweb.cloud` на `s3.twcstorage.ru`.
15
+
5
16
  # Версия 2.11.0 (2025.04.01)
6
17
 
7
18
  ## Добавлено
twc/__version__.py CHANGED
@@ -12,5 +12,5 @@
12
12
  import sys
13
13
 
14
14
 
15
- __version__ = "2.11.0"
15
+ __version__ = "2.12.0"
16
16
  __pyversion__ = sys.version.replace("\n", "")
twc/api/client.py CHANGED
@@ -1162,6 +1162,11 @@ class TimewebCloud(TimewebCloudBase):
1162
1162
  comment: Optional[str] = None,
1163
1163
  project_id: Optional[int] = None,
1164
1164
  certificates: Optional[dict] = None,
1165
+ max_connections: Optional[int] = None,
1166
+ connect_timeout: Optional[int] = None,
1167
+ client_timeout: Optional[int] = None,
1168
+ server_timeout: Optional[int] = None,
1169
+ http_timeout: Optional[int] = None,
1165
1170
  ):
1166
1171
  """Create load balancer."""
1167
1172
  payload = {
@@ -1183,6 +1188,31 @@ class TimewebCloud(TimewebCloudBase):
1183
1188
  **({"comment": comment} if comment else {}),
1184
1189
  **({"project_id": project_id} if project_id else {}),
1185
1190
  **({"certificates": certificates} if certificates else {}),
1191
+ **(
1192
+ {"maxconn": max_connections}
1193
+ if max_connections is not None
1194
+ else {}
1195
+ ),
1196
+ **(
1197
+ {"connect_timeout": connect_timeout}
1198
+ if connect_timeout is not None
1199
+ else {}
1200
+ ),
1201
+ **(
1202
+ {"client_timeout": client_timeout}
1203
+ if client_timeout is not None
1204
+ else {}
1205
+ ),
1206
+ **(
1207
+ {"server_timeout": server_timeout}
1208
+ if server_timeout is not None
1209
+ else {}
1210
+ ),
1211
+ **(
1212
+ {"httprequest_timeout": http_timeout}
1213
+ if http_timeout is not None
1214
+ else {}
1215
+ ),
1186
1216
  }
1187
1217
  return self._request("POST", f"{self.api_url}/balancers", json=payload)
1188
1218
 
@@ -1203,6 +1233,11 @@ class TimewebCloud(TimewebCloudBase):
1203
1233
  proxy_protocol: Optional[bool] = None,
1204
1234
  force_https: Optional[bool] = None,
1205
1235
  backend_keepalive: Optional[bool] = None,
1236
+ max_connections: Optional[int] = None,
1237
+ connect_timeout: Optional[int] = None,
1238
+ client_timeout: Optional[int] = None,
1239
+ server_timeout: Optional[int] = None,
1240
+ http_timeout: Optional[int] = None,
1206
1241
  ):
1207
1242
  """Update load balancer settings."""
1208
1243
  payload = {
@@ -1228,6 +1263,31 @@ class TimewebCloud(TimewebCloudBase):
1228
1263
  if backend_keepalive is not None
1229
1264
  else {}
1230
1265
  ),
1266
+ **(
1267
+ {"maxconn": max_connections}
1268
+ if max_connections is not None
1269
+ else {}
1270
+ ),
1271
+ **(
1272
+ {"connect_timeout": connect_timeout}
1273
+ if connect_timeout is not None
1274
+ else {}
1275
+ ),
1276
+ **(
1277
+ {"client_timeout": client_timeout}
1278
+ if client_timeout is not None
1279
+ else {}
1280
+ ),
1281
+ **(
1282
+ {"server_timeout": server_timeout}
1283
+ if server_timeout is not None
1284
+ else {}
1285
+ ),
1286
+ **(
1287
+ {"httprequest_timeout": http_timeout}
1288
+ if http_timeout is not None
1289
+ else {}
1290
+ ),
1231
1291
  }
1232
1292
  return self._request(
1233
1293
  "PATCH", f"{self.api_url}/balancers/{balancer_id}", json=payload
twc/commands/balancer.py CHANGED
@@ -198,6 +198,22 @@ def balancer_create(
198
198
  proxy_protocol: bool = typer.Option(False),
199
199
  force_https: bool = typer.Option(False),
200
200
  backend_keepalive: bool = typer.Option(False),
201
+ max_connections: Optional[int] = typer.Option(
202
+ None, help="Backend server's maximum number of concurrent connections."
203
+ ),
204
+ connect_timeout: Optional[int] = typer.Option(
205
+ None,
206
+ help="Maximum time to wait for a connection attempt to a backend server to succeed.",
207
+ ),
208
+ client_timeout: Optional[int] = typer.Option(
209
+ None, help="Maximum inactivity time on the client side."
210
+ ),
211
+ server_timeout: Optional[int] = typer.Option(
212
+ None, help="Maximum time for pending data staying into output buffer."
213
+ ),
214
+ http_timeout: Optional[int] = typer.Option(
215
+ None, help="Maximum allowed time to wait for a complete HTTP request."
216
+ ),
201
217
  project_id: Optional[int] = typer.Option(
202
218
  None,
203
219
  envvar="TWC_PROJECT",
@@ -259,6 +275,11 @@ def balancer_create(
259
275
  "network": {},
260
276
  "project_id": project_id,
261
277
  "certificates": {},
278
+ "max_connections": max_connections,
279
+ "connect_timeout": connect_timeout,
280
+ "client_timeout": client_timeout,
281
+ "server_timeout": server_timeout,
282
+ "http_timeout": http_timeout,
262
283
  }
263
284
 
264
285
  if cert_type == CertType.CUSTOM:
@@ -412,6 +433,22 @@ def balancer_set(
412
433
  proxy_protocol: Optional[bool] = typer.Option(None),
413
434
  force_https: Optional[bool] = typer.Option(None),
414
435
  backend_keepalive: Optional[bool] = typer.Option(None),
436
+ max_connections: Optional[int] = typer.Option(
437
+ None, help="Backend server's maximum number of concurrent connections."
438
+ ),
439
+ connect_timeout: Optional[int] = typer.Option(
440
+ None,
441
+ help="Maximum time to wait for a connection attempt to a backend server to succeed.",
442
+ ),
443
+ client_timeout: Optional[int] = typer.Option(
444
+ None, help="Maximum inactivity time on the client side."
445
+ ),
446
+ server_timeout: Optional[int] = typer.Option(
447
+ None, help="Maximum time for pending data staying into output buffer."
448
+ ),
449
+ http_timeout: Optional[int] = typer.Option(
450
+ None, help="Maximum allowed time to wait for a complete HTTP request."
451
+ ),
415
452
  ):
416
453
  """Change load balancer parameters."""
417
454
  client = create_client(config, profile)
@@ -442,6 +479,11 @@ def balancer_set(
442
479
  proxy_protocol=proxy_protocol,
443
480
  force_https=force_https,
444
481
  backend_keepalive=backend_keepalive,
482
+ max_connections=max_connections,
483
+ connect_timeout=connect_timeout,
484
+ client_timeout=client_timeout,
485
+ server_timeout=server_timeout,
486
+ http_timeout=http_timeout,
445
487
  )
446
488
 
447
489
  fmt.printer(
twc/commands/storage.py CHANGED
@@ -611,7 +611,7 @@ def storage_genconfig(
611
611
  "rclone": RCLONE_CONFIG_TEMPLATE.strip(),
612
612
  }
613
613
 
614
- endpoint = "s3.timeweb.cloud"
614
+ endpoint = "s3.twcstorage.ru"
615
615
  if not access_key.isupper():
616
616
  # Legacy object storage service have lowercase usernames only.
617
617
  # New storage, on the contrary, always has keys in uppercase.
twc/vars.py CHANGED
@@ -8,7 +8,7 @@ expand or other infrastructure or product changes occur.
8
8
  CONTROL_PANEL_URL = "https://timeweb.cloud/my"
9
9
 
10
10
  # Location specific parameters. May change later.
11
- REGIONS_WITH_IPV6 = ["ru-1", "ru-3", "pl-1", "nl-1"]
11
+ REGIONS_WITH_IPV6 = ["ru-1", "ru-3", "pl-1", "nl-1", "kz-1"]
12
12
  REGIONS_WITH_IMAGES = ["ru-1", "ru-3", "kz-1", "pl-1", "nl-1"]
13
13
  REGIONS_WITH_LAN = ["ru-1", "ru-3", "nl-1", "pl-1", "de-1"]
14
14
  ZONES_WITH_LAN = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: twc-cli
3
- Version: 2.11.0
3
+ Version: 2.12.0
4
4
  Summary: Timeweb Cloud Command Line Interface.
5
5
  Home-page: https://github.com/timeweb-cloud/twc
6
6
  License: MIT
@@ -1,17 +1,17 @@
1
- CHANGELOG.md,sha256=13dFSq5_w3jOkyqJWX39HZDmScz6IZiBKrDkmA0wMQQ,30968
1
+ CHANGELOG.md,sha256=L4iyG04B4hlQYlj6OXJQWvOIS0f-pmCZVbvV7xlsap8,31472
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=mwk8unQ99PJ4YQ7EDXxikgVBdMFiYEKCiMYG2c5C-ZY,443
5
+ twc/__version__.py,sha256=vyBciXWNGbjPeCy9tHWEKQFwm1VPc6m1_8-OvqI6EeA,443
6
6
  twc/api/__init__.py,sha256=SXew0Fe51M7nRBNQaaLRH4NjnRHkQUn7J26OCkQsftA,128
7
7
  twc/api/base.py,sha256=QRefnIgmlbz8n37GLBKeAK1AtzkcNo1IFjZgHDDECJ4,7912
8
- twc/api/client.py,sha256=zEpBs_wNaUiS7jMiDikrkuIZE_SggCtdXhihXFt0R7o,64795
8
+ twc/api/client.py,sha256=ovP8Dz1A8SjTisIL0Vr2scCRYN_SJg9fayA1f6SQix8,66773
9
9
  twc/api/exceptions.py,sha256=6nMU20f-Xe7EbH2jpfmSGMW69Rwfhh_ph9ygz37G0XY,2416
10
10
  twc/api/types.py,sha256=uagnD3TPpoJFYUFK6HfHQPlEXs2GLxuJdjhNIbraXwM,5374
11
11
  twc/apiwrap.py,sha256=hKrg_o6rLfY32SEnWMc1BSXHnSAh7TGar1JQ90YnG5M,2970
12
12
  twc/commands/__init__.py,sha256=a-6fHQQwOj--Z7uBZGZL3z1rvJiOGUMQMRET1UknIYo,430
13
13
  twc/commands/account.py,sha256=6q9ri02oFbUUZuqNVXO-uHOX45B4ELJlPjyfVaEL5Qw,5960
14
- twc/commands/balancer.py,sha256=ux1SGsUPNPCsonbE8p1ABymE7pA2abX8Omm2VhZijy4,26585
14
+ twc/commands/balancer.py,sha256=SygXDpJpjybsfxfCN02-WsWyjLS-77qEGuYZoxsfmA4,28382
15
15
  twc/commands/common.py,sha256=Wph8cVogUNNvc456SQrASb7mv7G88I8ETwHgISVjLQQ,8282
16
16
  twc/commands/config.py,sha256=xHNEZVmM60c9dApLfNsj78sXZk6VsFwPdVIHO9r8xks,8802
17
17
  twc/commands/database.py,sha256=NOi5b-DGYgbbN7bPrsJt0wKTJBzrfKUPwltVx8YGsgU,31953
@@ -23,14 +23,14 @@ twc/commands/kubernetes.py,sha256=-Cgas1vFVMcrWGinjstuUz3sqX0ZNXv_4mwPwuwKeLE,20
23
23
  twc/commands/project.py,sha256=xnL3kLIumKzrI9EZ6r6m-PGOl3mZ9IhLQua7WZ3Rghg,10499
24
24
  twc/commands/server.py,sha256=5yb_pdB5BOoj_UAWdMxiCtuGdRBgcllkStMqyRSlx9k,72315
25
25
  twc/commands/ssh_key.py,sha256=NHgTPhAQpDzt-iPHHVo4XqUJvujNqf019N6N9qYZ9Us,7941
26
- twc/commands/storage.py,sha256=Pztk5iUBp9RtkdOwsfHaZFCnD8GuH6zOPtluawkRmiI,19404
26
+ twc/commands/storage.py,sha256=u7R6L3vZr1YdAVUw-oENAbrkdci2dMb-7E1RkPK9KLg,19404
27
27
  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=AHZEwtQ_BQbnP0n7RXJ-qhqeKPQ_FPc8SDgg6osR5uU,822
32
- twc_cli-2.11.0.dist-info/COPYING,sha256=fpJLxZS_kHr_659xkpmqEtqHeZp6lQR9CmKCwnYbsmE,1089
33
- twc_cli-2.11.0.dist-info/METADATA,sha256=2PapxhJ2AA5vCK_xy76_2dC2HqW3dphy49ssYxh-6e0,2653
34
- twc_cli-2.11.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
35
- twc_cli-2.11.0.dist-info/entry_points.txt,sha256=tmTaVRhm8BkNrXC_9XJMum7O9wFVOvkXcBetxmahWvE,40
36
- twc_cli-2.11.0.dist-info/RECORD,,
31
+ twc/vars.py,sha256=ljW52q6XwsbQqOBPGhs5rbZ5ZqVvQXdKqUt8mLhXRts,830
32
+ twc_cli-2.12.0.dist-info/COPYING,sha256=fpJLxZS_kHr_659xkpmqEtqHeZp6lQR9CmKCwnYbsmE,1089
33
+ twc_cli-2.12.0.dist-info/METADATA,sha256=q-YUNB0fPiGn1yZi7SzoKdMeuIp2lr2yQR0r4WBd2Io,2653
34
+ twc_cli-2.12.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
35
+ twc_cli-2.12.0.dist-info/entry_points.txt,sha256=tmTaVRhm8BkNrXC_9XJMum7O9wFVOvkXcBetxmahWvE,40
36
+ twc_cli-2.12.0.dist-info/RECORD,,