gcore 0.3.0__py3-none-any.whl → 0.4.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 gcore might be problematic. Click here for more details.
- gcore/__init__.py +2 -1
- gcore/_base_client.py +22 -0
- gcore/_client.py +9 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +31 -28
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +7 -12
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +31 -20
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +9 -10
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +8 -4
- gcore/resources/cloud/inference/deployments/deployments.py +10 -2
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +47 -32
- gcore/resources/cloud/instances/interfaces.py +2 -2
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +10 -2
- gcore/resources/cloud/load_balancers/listeners.py +17 -8
- gcore/resources/cloud/load_balancers/load_balancers.py +73 -21
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +6 -2
- gcore/resources/cloud/networks/networks.py +81 -17
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +51 -11
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -16
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +21 -22
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +20 -20
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/tasks.py +4 -4
- gcore/resources/cloud/users/role_assignments.py +12 -14
- gcore/resources/cloud/volumes.py +139 -49
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +0 -14
- gcore/resources/waap/waap.py +0 -32
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +4 -8
- gcore/types/cloud/baremetal/server_list_params.py +1 -5
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_list_params.py +1 -5
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +2 -3
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +2 -4
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/instance_create_params.py +7 -8
- gcore/types/cloud/instance_list_params.py +1 -5
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- gcore/types/cloud/load_balancer_create_params.py +8 -4
- gcore/types/cloud/load_balancer_list_params.py +1 -5
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/pool_create_params.py +6 -1
- gcore/types/cloud/load_balancers/pool_update_params.py +6 -1
- gcore/types/cloud/load_balancers/pools/member_add_params.py +6 -1
- gcore/types/cloud/member.py +6 -1
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_list_params.py +4 -5
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +2 -3
- gcore/types/cloud/networks/subnet_list_params.py +1 -5
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/reserved_fixed_ip_list_params.py +2 -2
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/volume_list_params.py +1 -5
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +0 -1
- gcore/types/waap/domains/custom_rule_create_params.py +7 -3
- gcore/types/waap/domains/custom_rule_update_params.py +7 -3
- gcore/types/waap/waap_custom_rule.py +7 -3
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/RECORD +115 -101
- gcore/resources/waap/clients.py +0 -135
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -59
- gcore/types/waap/client_me_response.py +0 -34
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.3.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -160,7 +160,7 @@ class BillingReservationsResource(SyncAPIResource):
|
|
|
160
160
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
161
161
|
) -> BillingReservation:
|
|
162
162
|
"""
|
|
163
|
-
Get
|
|
163
|
+
Get reservation
|
|
164
164
|
|
|
165
165
|
Args:
|
|
166
166
|
reservation_id: ID of the reservation
|
|
@@ -316,7 +316,7 @@ class AsyncBillingReservationsResource(AsyncAPIResource):
|
|
|
316
316
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
317
317
|
) -> BillingReservation:
|
|
318
318
|
"""
|
|
319
|
-
Get
|
|
319
|
+
Get reservation
|
|
320
320
|
|
|
321
321
|
Args:
|
|
322
322
|
reservation_id: ID of the reservation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Iterable
|
|
5
|
+
from typing import Dict, Iterable
|
|
6
6
|
from typing_extensions import Literal, overload
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -35,7 +35,6 @@ from ....types.cloud import (
|
|
|
35
35
|
from ...._base_client import AsyncPaginator, make_request_options
|
|
36
36
|
from ....types.cloud.file_share import FileShare
|
|
37
37
|
from ....types.cloud.task_id_list import TaskIDList
|
|
38
|
-
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
39
38
|
|
|
40
39
|
__all__ = ["FileSharesResource", "AsyncFileSharesResource"]
|
|
41
40
|
|
|
@@ -75,7 +74,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
75
74
|
protocol: Literal["NFS"],
|
|
76
75
|
size: int,
|
|
77
76
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
78
|
-
tags:
|
|
77
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
79
78
|
volume_type: Literal["default_share_type"] | NotGiven = NOT_GIVEN,
|
|
80
79
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
81
80
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -130,7 +129,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
130
129
|
protocol: Literal["NFS"],
|
|
131
130
|
size: int,
|
|
132
131
|
volume_type: Literal["vast_share_type"],
|
|
133
|
-
tags:
|
|
132
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
134
133
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
135
134
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
136
135
|
extra_headers: Headers | None = None,
|
|
@@ -181,7 +180,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
181
180
|
protocol: Literal["NFS"],
|
|
182
181
|
size: int,
|
|
183
182
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
184
|
-
tags:
|
|
183
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
185
184
|
volume_type: Literal["default_share_type"] | Literal["vast_share_type"] | NotGiven = NOT_GIVEN,
|
|
186
185
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
187
186
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -504,7 +503,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
504
503
|
protocol: Literal["NFS"],
|
|
505
504
|
size: int,
|
|
506
505
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
507
|
-
tags:
|
|
506
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
508
507
|
volume_type: Literal["default_share_type"] | NotGiven = NOT_GIVEN,
|
|
509
508
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
510
509
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -559,7 +558,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
559
558
|
protocol: Literal["NFS"],
|
|
560
559
|
size: int,
|
|
561
560
|
volume_type: Literal["vast_share_type"],
|
|
562
|
-
tags:
|
|
561
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
563
562
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
564
563
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
565
564
|
extra_headers: Headers | None = None,
|
|
@@ -610,7 +609,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
610
609
|
protocol: Literal["NFS"],
|
|
611
610
|
size: int,
|
|
612
611
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
613
|
-
tags:
|
|
612
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
614
613
|
volume_type: Literal["default_share_type"] | Literal["vast_share_type"] | NotGiven = NOT_GIVEN,
|
|
615
614
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
616
615
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Optional
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -22,7 +22,6 @@ from ..._base_client import AsyncPaginator, make_request_options
|
|
|
22
22
|
from ...types.cloud.floating_ip import FloatingIP
|
|
23
23
|
from ...types.cloud.task_id_list import TaskIDList
|
|
24
24
|
from ...types.cloud.floating_ip_detailed import FloatingIPDetailed
|
|
25
|
-
from ...types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
26
25
|
|
|
27
26
|
__all__ = ["FloatingIPsResource", "AsyncFloatingIPsResource"]
|
|
28
27
|
|
|
@@ -54,7 +53,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
54
53
|
region_id: int | None = None,
|
|
55
54
|
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
56
55
|
port_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
57
|
-
tags:
|
|
56
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
58
57
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
58
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
59
|
extra_headers: Headers | None = None,
|
|
@@ -141,9 +140,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
141
140
|
|
|
142
141
|
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
143
142
|
|
|
144
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
145
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
146
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
143
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
147
144
|
|
|
148
145
|
extra_headers: Send extra headers
|
|
149
146
|
|
|
@@ -322,7 +319,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
322
319
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
323
320
|
) -> FloatingIP:
|
|
324
321
|
"""
|
|
325
|
-
Unassign floating IP
|
|
322
|
+
Unassign floating IP
|
|
326
323
|
|
|
327
324
|
Args:
|
|
328
325
|
extra_headers: Send extra headers
|
|
@@ -375,7 +372,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
375
372
|
region_id: int | None = None,
|
|
376
373
|
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
377
374
|
port_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
378
|
-
tags:
|
|
375
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
379
376
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
380
377
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
381
378
|
extra_headers: Headers | None = None,
|
|
@@ -462,9 +459,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
462
459
|
|
|
463
460
|
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
464
461
|
|
|
465
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
466
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
467
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
462
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
468
463
|
|
|
469
464
|
extra_headers: Send extra headers
|
|
470
465
|
|
|
@@ -643,7 +638,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
643
638
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
644
639
|
) -> FloatingIP:
|
|
645
640
|
"""
|
|
646
|
-
Unassign floating IP
|
|
641
|
+
Unassign floating IP
|
|
647
642
|
|
|
648
643
|
Args:
|
|
649
644
|
extra_headers: Send extra headers
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Iterable, Optional
|
|
5
|
+
from typing import Dict, List, Iterable, Optional
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -58,7 +58,6 @@ from ....types.cloud import (
|
|
|
58
58
|
)
|
|
59
59
|
from ...._base_client import AsyncPaginator, make_request_options
|
|
60
60
|
from ....types.cloud.task_id_list import TaskIDList
|
|
61
|
-
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
62
61
|
from ....types.cloud.gpu_baremetal_cluster import GPUBaremetalCluster
|
|
63
62
|
from ....types.cloud.gpu_baremetal_cluster_server_list import GPUBaremetalClusterServerList
|
|
64
63
|
|
|
@@ -113,7 +112,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
113
112
|
instances_count: int | NotGiven = NOT_GIVEN,
|
|
114
113
|
password: str | NotGiven = NOT_GIVEN,
|
|
115
114
|
ssh_key_name: str | NotGiven = NOT_GIVEN,
|
|
116
|
-
tags:
|
|
115
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
117
116
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
118
117
|
username: str | NotGiven = NOT_GIVEN,
|
|
119
118
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -123,8 +122,10 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
123
122
|
extra_body: Body | None = None,
|
|
124
123
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
125
124
|
) -> TaskIDList:
|
|
126
|
-
"""
|
|
127
|
-
|
|
125
|
+
"""Create a new GPU cluster with specified configuration.
|
|
126
|
+
|
|
127
|
+
The cluster can be
|
|
128
|
+
created with one or more nodes.
|
|
128
129
|
|
|
129
130
|
Args:
|
|
130
131
|
flavor: Flavor name
|
|
@@ -440,8 +441,10 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
440
441
|
extra_body: Body | None = None,
|
|
441
442
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
442
443
|
) -> TaskIDList:
|
|
443
|
-
"""
|
|
444
|
-
|
|
444
|
+
"""Rebuild one or more nodes in a GPU cluster.
|
|
445
|
+
|
|
446
|
+
All cluster nodes must be specified
|
|
447
|
+
to update the cluster image.
|
|
445
448
|
|
|
446
449
|
Args:
|
|
447
450
|
nodes: List of nodes uuids to be rebuild
|
|
@@ -496,8 +499,10 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
496
499
|
extra_body: Body | None = None,
|
|
497
500
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
498
501
|
) -> TaskIDList:
|
|
499
|
-
"""
|
|
500
|
-
|
|
502
|
+
"""Change the number of nodes in a GPU cluster.
|
|
503
|
+
|
|
504
|
+
The cluster can be scaled up or
|
|
505
|
+
down.
|
|
501
506
|
|
|
502
507
|
Args:
|
|
503
508
|
instances_count: Resized (total) number of instances
|
|
@@ -515,7 +520,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
515
520
|
if region_id is None:
|
|
516
521
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
517
522
|
if not cluster_id:
|
|
518
|
-
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
523
|
+
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
519
524
|
return self._post(
|
|
520
525
|
f"/cloud/v1/ai/clusters/gpu/{project_id}/{region_id}/{cluster_id}/resize",
|
|
521
526
|
body=maybe_transform(
|
|
@@ -539,7 +544,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
539
544
|
name: str,
|
|
540
545
|
instances_count: int | NotGiven = NOT_GIVEN,
|
|
541
546
|
ssh_key_name: str | NotGiven = NOT_GIVEN,
|
|
542
|
-
tags:
|
|
547
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
543
548
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
544
549
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
545
550
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -735,7 +740,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
735
740
|
instances_count: int | NotGiven = NOT_GIVEN,
|
|
736
741
|
password: str | NotGiven = NOT_GIVEN,
|
|
737
742
|
ssh_key_name: str | NotGiven = NOT_GIVEN,
|
|
738
|
-
tags:
|
|
743
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
739
744
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
740
745
|
username: str | NotGiven = NOT_GIVEN,
|
|
741
746
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -745,8 +750,10 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
745
750
|
extra_body: Body | None = None,
|
|
746
751
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
747
752
|
) -> TaskIDList:
|
|
748
|
-
"""
|
|
749
|
-
|
|
753
|
+
"""Create a new GPU cluster with specified configuration.
|
|
754
|
+
|
|
755
|
+
The cluster can be
|
|
756
|
+
created with one or more nodes.
|
|
750
757
|
|
|
751
758
|
Args:
|
|
752
759
|
flavor: Flavor name
|
|
@@ -1062,8 +1069,10 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1062
1069
|
extra_body: Body | None = None,
|
|
1063
1070
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1064
1071
|
) -> TaskIDList:
|
|
1065
|
-
"""
|
|
1066
|
-
|
|
1072
|
+
"""Rebuild one or more nodes in a GPU cluster.
|
|
1073
|
+
|
|
1074
|
+
All cluster nodes must be specified
|
|
1075
|
+
to update the cluster image.
|
|
1067
1076
|
|
|
1068
1077
|
Args:
|
|
1069
1078
|
nodes: List of nodes uuids to be rebuild
|
|
@@ -1118,8 +1127,10 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1118
1127
|
extra_body: Body | None = None,
|
|
1119
1128
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1120
1129
|
) -> TaskIDList:
|
|
1121
|
-
"""
|
|
1122
|
-
|
|
1130
|
+
"""Change the number of nodes in a GPU cluster.
|
|
1131
|
+
|
|
1132
|
+
The cluster can be scaled up or
|
|
1133
|
+
down.
|
|
1123
1134
|
|
|
1124
1135
|
Args:
|
|
1125
1136
|
instances_count: Resized (total) number of instances
|
|
@@ -1137,7 +1148,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1137
1148
|
if region_id is None:
|
|
1138
1149
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
1139
1150
|
if not cluster_id:
|
|
1140
|
-
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
1151
|
+
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
1141
1152
|
return await self._post(
|
|
1142
1153
|
f"/cloud/v1/ai/clusters/gpu/{project_id}/{region_id}/{cluster_id}/resize",
|
|
1143
1154
|
body=await async_maybe_transform(
|
|
@@ -1161,7 +1172,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1161
1172
|
name: str,
|
|
1162
1173
|
instances_count: int | NotGiven = NOT_GIVEN,
|
|
1163
1174
|
ssh_key_name: str | NotGiven = NOT_GIVEN,
|
|
1164
|
-
tags:
|
|
1175
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
1165
1176
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1166
1177
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1167
1178
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import Dict, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -21,7 +21,6 @@ from ...._base_client import make_request_options
|
|
|
21
21
|
from ....types.cloud.gpu_image import GPUImage
|
|
22
22
|
from ....types.cloud.task_id_list import TaskIDList
|
|
23
23
|
from ....types.cloud.gpu_image_list import GPUImageList
|
|
24
|
-
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
25
24
|
from ....types.cloud.gpu_baremetal_clusters import image_upload_params
|
|
26
25
|
|
|
27
26
|
__all__ = ["ImagesResource", "AsyncImagesResource"]
|
|
@@ -101,7 +100,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
101
100
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
102
101
|
) -> TaskIDList:
|
|
103
102
|
"""
|
|
104
|
-
Delete bare metal GPU image
|
|
103
|
+
Delete bare metal GPU image
|
|
105
104
|
|
|
106
105
|
Args:
|
|
107
106
|
project_id: Project ID
|
|
@@ -182,7 +181,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
182
181
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
183
182
|
) -> GPUImage:
|
|
184
183
|
"""
|
|
185
|
-
Get bare metal GPU image
|
|
184
|
+
Get bare metal GPU image
|
|
186
185
|
|
|
187
186
|
Args:
|
|
188
187
|
project_id: Project ID
|
|
@@ -227,7 +226,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
227
226
|
os_type: Optional[Literal["linux", "windows"]] | NotGiven = NOT_GIVEN,
|
|
228
227
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
229
228
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
230
|
-
tags:
|
|
229
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
231
230
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
232
231
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
233
232
|
extra_headers: Headers | None = None,
|
|
@@ -317,7 +316,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
317
316
|
os_type: Optional[Literal["linux", "windows"]] | NotGiven = NOT_GIVEN,
|
|
318
317
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
319
318
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
320
|
-
tags:
|
|
319
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
321
320
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
322
321
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
323
322
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -444,7 +443,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
444
443
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
445
444
|
) -> TaskIDList:
|
|
446
445
|
"""
|
|
447
|
-
Delete bare metal GPU image
|
|
446
|
+
Delete bare metal GPU image
|
|
448
447
|
|
|
449
448
|
Args:
|
|
450
449
|
project_id: Project ID
|
|
@@ -525,7 +524,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
525
524
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
526
525
|
) -> GPUImage:
|
|
527
526
|
"""
|
|
528
|
-
Get bare metal GPU image
|
|
527
|
+
Get bare metal GPU image
|
|
529
528
|
|
|
530
529
|
Args:
|
|
531
530
|
project_id: Project ID
|
|
@@ -570,7 +569,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
570
569
|
os_type: Optional[Literal["linux", "windows"]] | NotGiven = NOT_GIVEN,
|
|
571
570
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
572
571
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
573
|
-
tags:
|
|
572
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
574
573
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
575
574
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
576
575
|
extra_headers: Headers | None = None,
|
|
@@ -660,7 +659,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
660
659
|
os_type: Optional[Literal["linux", "windows"]] | NotGiven = NOT_GIVEN,
|
|
661
660
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
662
661
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
663
|
-
tags:
|
|
662
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
664
663
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
665
664
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
666
665
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -53,7 +53,7 @@ class InterfacesResource(SyncAPIResource):
|
|
|
53
53
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
54
54
|
) -> NetworkInterfaceList:
|
|
55
55
|
"""
|
|
56
|
-
|
|
56
|
+
Retrieve a list of network interfaces attached to the GPU cluster servers.
|
|
57
57
|
|
|
58
58
|
Args:
|
|
59
59
|
extra_headers: Send extra headers
|
|
@@ -113,7 +113,7 @@ class AsyncInterfacesResource(AsyncAPIResource):
|
|
|
113
113
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
114
114
|
) -> NetworkInterfaceList:
|
|
115
115
|
"""
|
|
116
|
-
|
|
116
|
+
Retrieve a list of network interfaces attached to the GPU cluster servers.
|
|
117
117
|
|
|
118
118
|
Args:
|
|
119
119
|
extra_headers: Send extra headers
|
|
@@ -65,8 +65,10 @@ class ServersResource(SyncAPIResource):
|
|
|
65
65
|
extra_body: Body | None = None,
|
|
66
66
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
67
67
|
) -> TaskIDList:
|
|
68
|
-
"""
|
|
69
|
-
|
|
68
|
+
"""Delete a specific node from a GPU cluster.
|
|
69
|
+
|
|
70
|
+
The node must be in a state that
|
|
71
|
+
allows deletion.
|
|
70
72
|
|
|
71
73
|
Args:
|
|
72
74
|
delete_floatings: Set False if you do not want to delete assigned floating IPs. By default, it's
|
|
@@ -590,8 +592,10 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
590
592
|
extra_body: Body | None = None,
|
|
591
593
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
592
594
|
) -> TaskIDList:
|
|
593
|
-
"""
|
|
594
|
-
|
|
595
|
+
"""Delete a specific node from a GPU cluster.
|
|
596
|
+
|
|
597
|
+
The node must be in a state that
|
|
598
|
+
allows deletion.
|
|
595
599
|
|
|
596
600
|
Args:
|
|
597
601
|
delete_floatings: Set False if you do not want to delete assigned floating IPs. By default, it's
|
|
@@ -596,7 +596,11 @@ class DeploymentsResource(SyncAPIResource):
|
|
|
596
596
|
extra_headers=extra_headers,
|
|
597
597
|
polling_interval_seconds=polling_interval_seconds,
|
|
598
598
|
)
|
|
599
|
-
if
|
|
599
|
+
if (
|
|
600
|
+
not task.created_resources
|
|
601
|
+
or not task.created_resources.inference_instances
|
|
602
|
+
or len(task.created_resources.inference_instances) != 1
|
|
603
|
+
):
|
|
600
604
|
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
601
605
|
return self.get(
|
|
602
606
|
deployment_name=task.created_resources.inference_instances[0],
|
|
@@ -1263,7 +1267,11 @@ class AsyncDeploymentsResource(AsyncAPIResource):
|
|
|
1263
1267
|
extra_headers=extra_headers,
|
|
1264
1268
|
polling_interval_seconds=polling_interval_seconds,
|
|
1265
1269
|
)
|
|
1266
|
-
if
|
|
1270
|
+
if (
|
|
1271
|
+
not task.created_resources
|
|
1272
|
+
or not task.created_resources.inference_instances
|
|
1273
|
+
or len(task.created_resources.inference_instances) != 1
|
|
1274
|
+
):
|
|
1267
1275
|
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
1268
1276
|
return await self.get(
|
|
1269
1277
|
deployment_name=task.created_resources.inference_instances[0],
|
|
@@ -253,7 +253,7 @@ class RegistryCredentialsResource(SyncAPIResource):
|
|
|
253
253
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
254
254
|
) -> None:
|
|
255
255
|
"""
|
|
256
|
-
|
|
256
|
+
Replace inference registry credential
|
|
257
257
|
|
|
258
258
|
Args:
|
|
259
259
|
project_id: Project ID
|
|
@@ -522,7 +522,7 @@ class AsyncRegistryCredentialsResource(AsyncAPIResource):
|
|
|
522
522
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
523
523
|
) -> None:
|
|
524
524
|
"""
|
|
525
|
-
|
|
525
|
+
Replace inference registry credential
|
|
526
526
|
|
|
527
527
|
Args:
|
|
528
528
|
project_id: Project ID
|
|
@@ -58,7 +58,7 @@ class SecretsResource(SyncAPIResource):
|
|
|
58
58
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
59
59
|
) -> InferenceSecret:
|
|
60
60
|
"""
|
|
61
|
-
Create
|
|
61
|
+
Create inference secret
|
|
62
62
|
|
|
63
63
|
Args:
|
|
64
64
|
project_id: Project ID
|
|
@@ -108,7 +108,7 @@ class SecretsResource(SyncAPIResource):
|
|
|
108
108
|
extra_body: Body | None = None,
|
|
109
109
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
110
110
|
) -> SyncOffsetPage[InferenceSecret]:
|
|
111
|
-
"""List
|
|
111
|
+
"""List inference secrets
|
|
112
112
|
|
|
113
113
|
Args:
|
|
114
114
|
project_id: Project ID
|
|
@@ -203,7 +203,7 @@ class SecretsResource(SyncAPIResource):
|
|
|
203
203
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
204
204
|
) -> InferenceSecret:
|
|
205
205
|
"""
|
|
206
|
-
Get
|
|
206
|
+
Get inference secret
|
|
207
207
|
|
|
208
208
|
Args:
|
|
209
209
|
project_id: Project ID
|
|
@@ -245,7 +245,7 @@ class SecretsResource(SyncAPIResource):
|
|
|
245
245
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
246
246
|
) -> InferenceSecret:
|
|
247
247
|
"""
|
|
248
|
-
|
|
248
|
+
Replace inference secret
|
|
249
249
|
|
|
250
250
|
Args:
|
|
251
251
|
project_id: Project ID
|
|
@@ -319,7 +319,7 @@ class AsyncSecretsResource(AsyncAPIResource):
|
|
|
319
319
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
320
320
|
) -> InferenceSecret:
|
|
321
321
|
"""
|
|
322
|
-
Create
|
|
322
|
+
Create inference secret
|
|
323
323
|
|
|
324
324
|
Args:
|
|
325
325
|
project_id: Project ID
|
|
@@ -369,7 +369,7 @@ class AsyncSecretsResource(AsyncAPIResource):
|
|
|
369
369
|
extra_body: Body | None = None,
|
|
370
370
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
371
371
|
) -> AsyncPaginator[InferenceSecret, AsyncOffsetPage[InferenceSecret]]:
|
|
372
|
-
"""List
|
|
372
|
+
"""List inference secrets
|
|
373
373
|
|
|
374
374
|
Args:
|
|
375
375
|
project_id: Project ID
|
|
@@ -464,7 +464,7 @@ class AsyncSecretsResource(AsyncAPIResource):
|
|
|
464
464
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
465
465
|
) -> InferenceSecret:
|
|
466
466
|
"""
|
|
467
|
-
Get
|
|
467
|
+
Get inference secret
|
|
468
468
|
|
|
469
469
|
Args:
|
|
470
470
|
project_id: Project ID
|
|
@@ -506,7 +506,7 @@ class AsyncSecretsResource(AsyncAPIResource):
|
|
|
506
506
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
507
507
|
) -> InferenceSecret:
|
|
508
508
|
"""
|
|
509
|
-
|
|
509
|
+
Replace inference secret
|
|
510
510
|
|
|
511
511
|
Args:
|
|
512
512
|
project_id: Project ID
|