twc-cli 2.13.2__py3-none-any.whl → 2.14.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.
- twc/__version__.py +1 -1
- twc/commands/server.py +66 -0
- {twc_cli-2.13.2.dist-info → twc_cli-2.14.0.dist-info}/METADATA +1 -1
- {twc_cli-2.13.2.dist-info → twc_cli-2.14.0.dist-info}/RECORD +7 -7
- {twc_cli-2.13.2.dist-info → twc_cli-2.14.0.dist-info}/COPYING +0 -0
- {twc_cli-2.13.2.dist-info → twc_cli-2.14.0.dist-info}/WHEEL +0 -0
- {twc_cli-2.13.2.dist-info → twc_cli-2.14.0.dist-info}/entry_points.txt +0 -0
twc/__version__.py
CHANGED
twc/commands/server.py
CHANGED
|
@@ -1284,6 +1284,72 @@ def server_list_presets(
|
|
|
1284
1284
|
)
|
|
1285
1285
|
|
|
1286
1286
|
|
|
1287
|
+
# ------------------------------------------------------------- #
|
|
1288
|
+
# $ twc server list-configurators #
|
|
1289
|
+
# ------------------------------------------------------------- #
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
def _print_configurators(response: Response, filters: Optional[str] = None):
|
|
1293
|
+
confs = response.json()["server_configurators"]
|
|
1294
|
+
if filters:
|
|
1295
|
+
confs = fmt.filter_list(confs, filters)
|
|
1296
|
+
table = fmt.Table()
|
|
1297
|
+
table.header(
|
|
1298
|
+
[
|
|
1299
|
+
"ID",
|
|
1300
|
+
"REGION",
|
|
1301
|
+
"TYPE",
|
|
1302
|
+
"CPU(MIN/MAX)",
|
|
1303
|
+
"RAM(MIN/MAX)",
|
|
1304
|
+
"DISK(MIN/MAX)",
|
|
1305
|
+
"BW(MIN/MAX)",
|
|
1306
|
+
]
|
|
1307
|
+
)
|
|
1308
|
+
for conf in confs:
|
|
1309
|
+
table.row(
|
|
1310
|
+
[
|
|
1311
|
+
conf["id"],
|
|
1312
|
+
conf["location"],
|
|
1313
|
+
conf["disk_type"],
|
|
1314
|
+
f"{conf['requirements']['cpu_min']}/{conf['requirements']['cpu_max']}",
|
|
1315
|
+
f"{conf['requirements']['ram_min']}/{conf['requirements']['ram_max']}",
|
|
1316
|
+
f"{conf['requirements']['disk_min']}/{conf['requirements']['disk_max']}",
|
|
1317
|
+
(
|
|
1318
|
+
f"{conf['requirements']['network_bandwidth_min']}/"
|
|
1319
|
+
f"{conf['requirements']['network_bandwidth_max']}"
|
|
1320
|
+
),
|
|
1321
|
+
]
|
|
1322
|
+
)
|
|
1323
|
+
table.print()
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
@server.command("list-configurators", "lc")
|
|
1327
|
+
def server_list_configurators(
|
|
1328
|
+
verbose: Optional[bool] = verbose_option,
|
|
1329
|
+
config: Optional[Path] = config_option,
|
|
1330
|
+
profile: Optional[str] = profile_option,
|
|
1331
|
+
output_format: Optional[str] = output_format_option,
|
|
1332
|
+
filters: Optional[str] = filter_option,
|
|
1333
|
+
region: Optional[ServiceRegion] = typer.Option(
|
|
1334
|
+
None, help="Use region (location)."
|
|
1335
|
+
),
|
|
1336
|
+
):
|
|
1337
|
+
"""List Cloud Server configurators (sets of configuration constraints)."""
|
|
1338
|
+
if region:
|
|
1339
|
+
if filters:
|
|
1340
|
+
filters = f"{filters},location:{region.value}"
|
|
1341
|
+
else:
|
|
1342
|
+
filters = f"location:{region.value}"
|
|
1343
|
+
client = create_client(config, profile)
|
|
1344
|
+
response = client.get_server_configurators()
|
|
1345
|
+
fmt.printer(
|
|
1346
|
+
response,
|
|
1347
|
+
output_format=output_format,
|
|
1348
|
+
filters=filters,
|
|
1349
|
+
func=_print_configurators,
|
|
1350
|
+
)
|
|
1351
|
+
|
|
1352
|
+
|
|
1287
1353
|
# ------------------------------------------------------------- #
|
|
1288
1354
|
# $ twc server list-os-images #
|
|
1289
1355
|
# ------------------------------------------------------------- #
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
twc/__init__.py,sha256=NwPAMNw3NuHdWGQvWS9_lromVF6VM194oVOipojfJns,113
|
|
2
2
|
twc/__main__.py,sha256=lgyLdXuTDWQXmXkpGCxStOUBqYGQZEUdlj7IrhJeTdQ,2511
|
|
3
|
-
twc/__version__.py,sha256=
|
|
3
|
+
twc/__version__.py,sha256=LBerFLjL9QuMoiuKXb2EazclUbZFooobsTmpxbM42pA,443
|
|
4
4
|
twc/api/__init__.py,sha256=SXew0Fe51M7nRBNQaaLRH4NjnRHkQUn7J26OCkQsftA,128
|
|
5
5
|
twc/api/base.py,sha256=QRefnIgmlbz8n37GLBKeAK1AtzkcNo1IFjZgHDDECJ4,7912
|
|
6
6
|
twc/api/client.py,sha256=AwnbD78CWv1gSVs4lYBDJ8s0-RRPV2SYOjaAaZlNREg,68129
|
|
@@ -20,7 +20,7 @@ twc/commands/floating_ip.py,sha256=G9nD5BbHCZcuytbzeneDJWQDhd8c8WRtq9pAfwI9m7E,8
|
|
|
20
20
|
twc/commands/image.py,sha256=OviQwegXK55H3TBlroCASVcgj2QUVCTo0ZhF5ug9eT8,8165
|
|
21
21
|
twc/commands/kubernetes.py,sha256=-Cgas1vFVMcrWGinjstuUz3sqX0ZNXv_4mwPwuwKeLE,20870
|
|
22
22
|
twc/commands/project.py,sha256=xnL3kLIumKzrI9EZ6r6m-PGOl3mZ9IhLQua7WZ3Rghg,10499
|
|
23
|
-
twc/commands/server.py,sha256
|
|
23
|
+
twc/commands/server.py,sha256=tgXhH3vWzigtqdY5Fp6b2dg7_0k8m3LpLV6qw_mamjo,74570
|
|
24
24
|
twc/commands/ssh_key.py,sha256=NHgTPhAQpDzt-iPHHVo4XqUJvujNqf019N6N9qYZ9Us,7941
|
|
25
25
|
twc/commands/storage.py,sha256=u7R6L3vZr1YdAVUw-oENAbrkdci2dMb-7E1RkPK9KLg,19404
|
|
26
26
|
twc/commands/vpc.py,sha256=SAht6UD17mU0d_AZY6W34VEYs7CqUsS2iDakPFxAFQU,8876
|
|
@@ -28,8 +28,8 @@ twc/fmt.py,sha256=nbuYZ8nVabYDwCmZqnL3-c6Tmri4B-R_sTCkG6sdfeI,7171
|
|
|
28
28
|
twc/typerx.py,sha256=AZ6BgTQvlrZYfKVYd9YqRNQnAR2XuyqImz4rf6di6f4,6737
|
|
29
29
|
twc/utils.py,sha256=uWizyUC4dHLwtk50q4Sub3zOvnVESfHKBbXYwk5t71w,651
|
|
30
30
|
twc/vars.py,sha256=ljW52q6XwsbQqOBPGhs5rbZ5ZqVvQXdKqUt8mLhXRts,830
|
|
31
|
-
twc_cli-2.
|
|
32
|
-
twc_cli-2.
|
|
33
|
-
twc_cli-2.
|
|
34
|
-
twc_cli-2.
|
|
35
|
-
twc_cli-2.
|
|
31
|
+
twc_cli-2.14.0.dist-info/COPYING,sha256=fpJLxZS_kHr_659xkpmqEtqHeZp6lQR9CmKCwnYbsmE,1089
|
|
32
|
+
twc_cli-2.14.0.dist-info/METADATA,sha256=6l-ShG1UYpuuRqsefagOqdnPQZhTVNYf8u2CJmI6ybU,2695
|
|
33
|
+
twc_cli-2.14.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
34
|
+
twc_cli-2.14.0.dist-info/entry_points.txt,sha256=tmTaVRhm8BkNrXC_9XJMum7O9wFVOvkXcBetxmahWvE,40
|
|
35
|
+
twc_cli-2.14.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|