yicloud-sdk-python 0.5.0__tar.gz → 0.5.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.
- {yicloud_sdk_python-0.5.0/yicloud_sdk_python.egg-info → yicloud_sdk_python-0.5.1}/PKG-INFO +1 -1
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/pyproject.toml +1 -1
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/version.py +1 -1
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/__init__.py +1 -1
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/mc/__init__.py +66 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/mc/actions.py +420 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/mc/models.py +348 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1/yicloud_sdk_python.egg-info}/PKG-INFO +1 -1
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/LICENSE +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/README.md +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/setup.cfg +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/auth/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/auth/credential.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/auth/sign.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/config.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/errs/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/log/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/log/logger.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/log/std.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/msgs/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/utils/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/utils/helps.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/utils/retry/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/base/utils/retry/retry.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/bc/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/bc/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/bc/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/bc/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/dataset/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/dataset/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/dataset/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/dataset/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/fs/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/fs/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/fs/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/fs/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/iam/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/iam/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/iam/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/iam/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/inferset/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/inferset/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/inferset/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/inferset/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/job/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/job/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/job/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/job/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/mc/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/modelrepo/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/modelrepo/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/modelrepo/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/modelrepo/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/monitor/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/monitor/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/monitor/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/monitor/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/oss/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/oss/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/oss/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/oss/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/ray/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/ray/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/ray/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/ray/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/registry/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/registry/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/registry/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/registry/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/sandbox/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/sandbox/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/sandbox/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/sandbox/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/service/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/service/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/service/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/service/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/volume/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/volume/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/volume/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/volume/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/workspace/__init__.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/workspace/actions.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/workspace/client.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud/services/workspace/models.py +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud_sdk_python.egg-info/SOURCES.txt +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud_sdk_python.egg-info/dependency_links.txt +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud_sdk_python.egg-info/not-zip-safe +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud_sdk_python.egg-info/requires.txt +0 -0
- {yicloud_sdk_python-0.5.0 → yicloud_sdk_python-0.5.1}/yicloud_sdk_python.egg-info/top_level.txt +0 -0
|
@@ -5,18 +5,22 @@ from . import actions, models
|
|
|
5
5
|
|
|
6
6
|
# Re-export action functions
|
|
7
7
|
from .actions import (
|
|
8
|
+
add_resource_pool_machines,
|
|
8
9
|
assign_nodes,
|
|
9
10
|
bind_project_user,
|
|
10
11
|
create_project,
|
|
11
12
|
create_quota_group,
|
|
13
|
+
create_resource_pool,
|
|
12
14
|
delete_project,
|
|
13
15
|
delete_quota_group,
|
|
16
|
+
delete_resource_pool,
|
|
14
17
|
get_low_priority_usage,
|
|
15
18
|
get_node_quota,
|
|
16
19
|
get_project,
|
|
17
20
|
get_project_quota,
|
|
18
21
|
get_project_quota_limit,
|
|
19
22
|
get_quota_group,
|
|
23
|
+
get_resource_pool,
|
|
20
24
|
list_audit_logs,
|
|
21
25
|
list_events,
|
|
22
26
|
list_node_configuration,
|
|
@@ -27,27 +31,41 @@ from .actions import (
|
|
|
27
31
|
list_projects,
|
|
28
32
|
list_projects_simple,
|
|
29
33
|
list_projects_with_sku_quotas,
|
|
34
|
+
list_quota_group_resource_pool_shared_nodes,
|
|
30
35
|
list_quota_groups,
|
|
31
36
|
list_quota_groups_simple,
|
|
32
37
|
list_quota_groups_under_tenant,
|
|
38
|
+
list_resource_pool_assignable_nodes,
|
|
39
|
+
list_resource_pool_instances,
|
|
40
|
+
list_resource_pool_names,
|
|
41
|
+
list_resource_pool_nodes,
|
|
42
|
+
list_resource_pools,
|
|
33
43
|
list_skus,
|
|
34
44
|
list_zones,
|
|
35
45
|
operate_node,
|
|
36
46
|
remove_project_user,
|
|
47
|
+
remove_resource_pool_machines,
|
|
48
|
+
set_resource_pool_gpu_node_limit,
|
|
49
|
+
set_resource_pool_machine_schedulable,
|
|
37
50
|
update_project,
|
|
38
51
|
update_quota_group,
|
|
52
|
+
update_resource_pool,
|
|
53
|
+
add_resource_pool_machines_async,
|
|
39
54
|
assign_nodes_async,
|
|
40
55
|
bind_project_user_async,
|
|
41
56
|
create_project_async,
|
|
42
57
|
create_quota_group_async,
|
|
58
|
+
create_resource_pool_async,
|
|
43
59
|
delete_project_async,
|
|
44
60
|
delete_quota_group_async,
|
|
61
|
+
delete_resource_pool_async,
|
|
45
62
|
get_low_priority_usage_async,
|
|
46
63
|
get_node_quota_async,
|
|
47
64
|
get_project_async,
|
|
48
65
|
get_project_quota_async,
|
|
49
66
|
get_project_quota_limit_async,
|
|
50
67
|
get_quota_group_async,
|
|
68
|
+
get_resource_pool_async,
|
|
51
69
|
list_audit_logs_async,
|
|
52
70
|
list_events_async,
|
|
53
71
|
list_node_configuration_async,
|
|
@@ -58,15 +76,25 @@ from .actions import (
|
|
|
58
76
|
list_projects_async,
|
|
59
77
|
list_projects_simple_async,
|
|
60
78
|
list_projects_with_sku_quotas_async,
|
|
79
|
+
list_quota_group_resource_pool_shared_nodes_async,
|
|
61
80
|
list_quota_groups_async,
|
|
62
81
|
list_quota_groups_simple_async,
|
|
63
82
|
list_quota_groups_under_tenant_async,
|
|
83
|
+
list_resource_pool_assignable_nodes_async,
|
|
84
|
+
list_resource_pool_instances_async,
|
|
85
|
+
list_resource_pool_names_async,
|
|
86
|
+
list_resource_pool_nodes_async,
|
|
87
|
+
list_resource_pools_async,
|
|
64
88
|
list_skus_async,
|
|
65
89
|
list_zones_async,
|
|
66
90
|
operate_node_async,
|
|
67
91
|
remove_project_user_async,
|
|
92
|
+
remove_resource_pool_machines_async,
|
|
93
|
+
set_resource_pool_gpu_node_limit_async,
|
|
94
|
+
set_resource_pool_machine_schedulable_async,
|
|
68
95
|
update_project_async,
|
|
69
96
|
update_quota_group_async,
|
|
97
|
+
update_resource_pool_async,
|
|
70
98
|
)
|
|
71
99
|
|
|
72
100
|
# Re-export models
|
|
@@ -80,13 +108,17 @@ from .models import (
|
|
|
80
108
|
SchedStrategy,
|
|
81
109
|
UpdateOption,
|
|
82
110
|
UsageType,
|
|
111
|
+
AddResourcePoolMachinesData,
|
|
112
|
+
AddResourcePoolMachinesReq,
|
|
83
113
|
AssignNodesReq,
|
|
84
114
|
AuditLogData,
|
|
85
115
|
BindProjectUserReq,
|
|
86
116
|
CpuMemoryLimit,
|
|
87
117
|
CreateProjectReq,
|
|
88
118
|
CreateQuotaGroupReq,
|
|
119
|
+
CreateResourcePoolReq,
|
|
89
120
|
DeleteProjectReq,
|
|
121
|
+
DeleteResourcePoolReq,
|
|
90
122
|
EventItem,
|
|
91
123
|
ListAuditLogsData,
|
|
92
124
|
ListEventsData,
|
|
@@ -98,6 +130,9 @@ from .models import (
|
|
|
98
130
|
ListProjectsWithSkuQuotasData,
|
|
99
131
|
ListProjectQuotaGroupsData,
|
|
100
132
|
ListQuotaGroupsSimpleData,
|
|
133
|
+
ListResourcePoolNamesData,
|
|
134
|
+
ListResourcePoolsData,
|
|
135
|
+
ListResourcePoolInstancesData,
|
|
101
136
|
ListSKUsData,
|
|
102
137
|
ListZonesData,
|
|
103
138
|
GetLowPriorityUsageData,
|
|
@@ -108,6 +143,7 @@ from .models import (
|
|
|
108
143
|
NodeQuota,
|
|
109
144
|
GetNodeQuotaData,
|
|
110
145
|
OperateNodeReq,
|
|
146
|
+
PoolMachineOperationData,
|
|
111
147
|
GetProjectData,
|
|
112
148
|
GetProjectQuotaData,
|
|
113
149
|
ProjectSimpleData,
|
|
@@ -125,16 +161,30 @@ from .models import (
|
|
|
125
161
|
GetProjectQuotaLimitData,
|
|
126
162
|
QuotaStatus,
|
|
127
163
|
RemoveProjectUserReq,
|
|
164
|
+
RemoveResourcePoolMachinesReq,
|
|
128
165
|
ResourceDetail,
|
|
166
|
+
CreateResourcePoolData,
|
|
167
|
+
ResourcePoolGpuInfoData,
|
|
168
|
+
ResourcePoolMachinesData,
|
|
169
|
+
ResourcePoolMetaDataData,
|
|
170
|
+
ResourcePoolNameData,
|
|
171
|
+
ResourcePoolResourcesConditionData,
|
|
172
|
+
ResourcePoolScopeData,
|
|
173
|
+
ResourcePoolStatusData,
|
|
129
174
|
SKUData,
|
|
175
|
+
SetResourcePoolGpuNodeLimitReq,
|
|
176
|
+
SetResourcePoolMachineSchedulableReq,
|
|
130
177
|
SkuQuotaResourceStatus,
|
|
131
178
|
CreateProjectReqSkuQuotaSpec,
|
|
132
179
|
UpdateProjectReqSkuQuotaSpec,
|
|
133
180
|
SkuQuotaStatusItem,
|
|
134
181
|
SkuQuotaStatusPublic,
|
|
135
182
|
SkuResourceUsage,
|
|
183
|
+
SubResourceData,
|
|
136
184
|
UpdateProjectReq,
|
|
137
185
|
UpdateQuotaGroupReq,
|
|
186
|
+
UpdateResourcePoolReq,
|
|
187
|
+
WorkloadData,
|
|
138
188
|
ZoneData,
|
|
139
189
|
DeleteQuotaGroupReq,
|
|
140
190
|
GetLowPriorityUsageReq,
|
|
@@ -143,6 +193,7 @@ from .models import (
|
|
|
143
193
|
GetProjectQuotaReq,
|
|
144
194
|
GetProjectQuotaLimitReq,
|
|
145
195
|
GetQuotaGroupReq,
|
|
196
|
+
GetResourcePoolReq,
|
|
146
197
|
ListAuditLogsReq,
|
|
147
198
|
ListEventsReq,
|
|
148
199
|
ListNodeConfigurationReq,
|
|
@@ -153,11 +204,26 @@ from .models import (
|
|
|
153
204
|
ListProjectsReq,
|
|
154
205
|
ListProjectsSimpleReq,
|
|
155
206
|
ListProjectsWithSkuQuotasReq,
|
|
207
|
+
ListQuotaGroupResourcePoolSharedNodesReq,
|
|
156
208
|
ListQuotaGroupsReq,
|
|
157
209
|
ListQuotaGroupsSimpleReq,
|
|
158
210
|
ListQuotaGroupsUnderTenantReq,
|
|
211
|
+
ListResourcePoolAssignableNodesReq,
|
|
212
|
+
ListResourcePoolInstancesReq,
|
|
213
|
+
ListResourcePoolNamesReq,
|
|
214
|
+
ListResourcePoolNodesReq,
|
|
215
|
+
ListResourcePoolsReq,
|
|
159
216
|
ListSKUsReq,
|
|
160
217
|
ListZonesReq,
|
|
218
|
+
RemoveResourcePoolMachinesData,
|
|
219
|
+
DeleteResourcePoolData,
|
|
220
|
+
GetResourcePoolData,
|
|
221
|
+
SetResourcePoolGpuNodeLimitData,
|
|
222
|
+
SetResourcePoolMachineSchedulableData,
|
|
223
|
+
UpdateResourcePoolData,
|
|
224
|
+
ListQuotaGroupResourcePoolSharedNodesData,
|
|
225
|
+
ListResourcePoolAssignableNodesData,
|
|
226
|
+
ListResourcePoolNodesData,
|
|
161
227
|
ListQuotaGroupsData,
|
|
162
228
|
ListQuotaGroupsUnderTenantData,
|
|
163
229
|
)
|
|
@@ -9,6 +9,36 @@ _PRODUCT_CODE = "mc"
|
|
|
9
9
|
_LAST_VERSION = "v1alpha1"
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
def add_resource_pool_machines(ctx: Optional[dict], req: models.AddResourcePoolMachinesReq) -> models.AddResourcePoolMachinesData:
|
|
13
|
+
"""添加机器到资源池
|
|
14
|
+
批量添加机器到资源池
|
|
15
|
+
POST /mc/v1alpha1/AddResourcePoolMachines
|
|
16
|
+
Action: AddResourcePoolMachines
|
|
17
|
+
|
|
18
|
+
Returns AddResourcePoolMachinesData on success.
|
|
19
|
+
Raises YiCloudException on error.
|
|
20
|
+
"""
|
|
21
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/AddResourcePoolMachines"
|
|
22
|
+
rsp = msgs.Rsp[models.AddResourcePoolMachinesData]()
|
|
23
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
24
|
+
return rsp.get_typed_data()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
async def add_resource_pool_machines_async(ctx: Optional[dict], req: models.AddResourcePoolMachinesReq) -> models.AddResourcePoolMachinesData:
|
|
28
|
+
"""添加机器到资源池(异步)
|
|
29
|
+
批量添加机器到资源池
|
|
30
|
+
POST /mc/v1alpha1/AddResourcePoolMachines
|
|
31
|
+
Action: AddResourcePoolMachines
|
|
32
|
+
|
|
33
|
+
Returns AddResourcePoolMachinesData on success.
|
|
34
|
+
Raises YiCloudException on error.
|
|
35
|
+
"""
|
|
36
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/AddResourcePoolMachines"
|
|
37
|
+
rsp = msgs.Rsp[models.AddResourcePoolMachinesData]()
|
|
38
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
39
|
+
return rsp.get_typed_data()
|
|
40
|
+
|
|
41
|
+
|
|
12
42
|
def assign_nodes(ctx: Optional[dict], req: models.AssignNodesReq):
|
|
13
43
|
"""分配节点
|
|
14
44
|
分配节点到指定项目和配额组
|
|
@@ -121,6 +151,36 @@ async def create_quota_group_async(ctx: Optional[dict], req: models.CreateQuotaG
|
|
|
121
151
|
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
122
152
|
|
|
123
153
|
|
|
154
|
+
def create_resource_pool(ctx: Optional[dict], req: models.CreateResourcePoolReq) -> models.CreateResourcePoolData:
|
|
155
|
+
"""创建资源池
|
|
156
|
+
创建资源池
|
|
157
|
+
POST /mc/v1alpha1/CreateResourcePool
|
|
158
|
+
Action: CreateResourcePool
|
|
159
|
+
|
|
160
|
+
Returns CreateResourcePoolData on success.
|
|
161
|
+
Raises YiCloudException on error.
|
|
162
|
+
"""
|
|
163
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/CreateResourcePool"
|
|
164
|
+
rsp = msgs.Rsp[models.CreateResourcePoolData]()
|
|
165
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
166
|
+
return rsp.get_typed_data()
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def create_resource_pool_async(ctx: Optional[dict], req: models.CreateResourcePoolReq) -> models.CreateResourcePoolData:
|
|
170
|
+
"""创建资源池(异步)
|
|
171
|
+
创建资源池
|
|
172
|
+
POST /mc/v1alpha1/CreateResourcePool
|
|
173
|
+
Action: CreateResourcePool
|
|
174
|
+
|
|
175
|
+
Returns CreateResourcePoolData on success.
|
|
176
|
+
Raises YiCloudException on error.
|
|
177
|
+
"""
|
|
178
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/CreateResourcePool"
|
|
179
|
+
rsp = msgs.Rsp[models.CreateResourcePoolData]()
|
|
180
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
181
|
+
return rsp.get_typed_data()
|
|
182
|
+
|
|
183
|
+
|
|
124
184
|
def delete_project(ctx: Optional[dict], req: models.DeleteProjectReq):
|
|
125
185
|
"""删除项目
|
|
126
186
|
删除项目
|
|
@@ -177,6 +237,36 @@ async def delete_quota_group_async(ctx: Optional[dict], req: models.DeleteQuotaG
|
|
|
177
237
|
await client.base.post_async(ctx, path, req, rsp)
|
|
178
238
|
|
|
179
239
|
|
|
240
|
+
def delete_resource_pool(ctx: Optional[dict], req: models.DeleteResourcePoolReq) -> models.DeleteResourcePoolData:
|
|
241
|
+
"""删除资源池
|
|
242
|
+
删除资源池
|
|
243
|
+
POST /mc/v1alpha1/DeleteResourcePool
|
|
244
|
+
Action: DeleteResourcePool
|
|
245
|
+
|
|
246
|
+
Returns DeleteResourcePoolData on success.
|
|
247
|
+
Raises YiCloudException on error.
|
|
248
|
+
"""
|
|
249
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/DeleteResourcePool"
|
|
250
|
+
rsp = msgs.Rsp[models.DeleteResourcePoolData]()
|
|
251
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
252
|
+
return rsp.get_typed_data()
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
async def delete_resource_pool_async(ctx: Optional[dict], req: models.DeleteResourcePoolReq) -> models.DeleteResourcePoolData:
|
|
256
|
+
"""删除资源池(异步)
|
|
257
|
+
删除资源池
|
|
258
|
+
POST /mc/v1alpha1/DeleteResourcePool
|
|
259
|
+
Action: DeleteResourcePool
|
|
260
|
+
|
|
261
|
+
Returns DeleteResourcePoolData on success.
|
|
262
|
+
Raises YiCloudException on error.
|
|
263
|
+
"""
|
|
264
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/DeleteResourcePool"
|
|
265
|
+
rsp = msgs.Rsp[models.DeleteResourcePoolData]()
|
|
266
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
267
|
+
return rsp.get_typed_data()
|
|
268
|
+
|
|
269
|
+
|
|
180
270
|
def get_low_priority_usage(ctx: Optional[dict], req: models.GetLowPriorityUsageReq) -> models.GetLowPriorityUsageData:
|
|
181
271
|
"""查询低优资源占用
|
|
182
272
|
查询低优(priority 1-3)Running pod 的资源占用,不计入配额;支持池/组双维度查询
|
|
@@ -357,6 +447,36 @@ async def get_quota_group_async(ctx: Optional[dict], req: models.GetQuotaGroupRe
|
|
|
357
447
|
return rsp.get_typed_data()
|
|
358
448
|
|
|
359
449
|
|
|
450
|
+
def get_resource_pool(ctx: Optional[dict], req: models.GetResourcePoolReq) -> models.GetResourcePoolData:
|
|
451
|
+
"""查询资源池详情
|
|
452
|
+
查询资源池详情
|
|
453
|
+
GET /mc/v1alpha1/GetResourcePool
|
|
454
|
+
Action: GetResourcePool
|
|
455
|
+
|
|
456
|
+
Returns GetResourcePoolData on success.
|
|
457
|
+
Raises YiCloudException on error.
|
|
458
|
+
"""
|
|
459
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/GetResourcePool"
|
|
460
|
+
rsp = msgs.Rsp[models.GetResourcePoolData]()
|
|
461
|
+
client.base.get(ctx, path, req, rsp)
|
|
462
|
+
return rsp.get_typed_data()
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
async def get_resource_pool_async(ctx: Optional[dict], req: models.GetResourcePoolReq) -> models.GetResourcePoolData:
|
|
466
|
+
"""查询资源池详情(异步)
|
|
467
|
+
查询资源池详情
|
|
468
|
+
GET /mc/v1alpha1/GetResourcePool
|
|
469
|
+
Action: GetResourcePool
|
|
470
|
+
|
|
471
|
+
Returns GetResourcePoolData on success.
|
|
472
|
+
Raises YiCloudException on error.
|
|
473
|
+
"""
|
|
474
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/GetResourcePool"
|
|
475
|
+
rsp = msgs.Rsp[models.GetResourcePoolData]()
|
|
476
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
477
|
+
return rsp.get_typed_data()
|
|
478
|
+
|
|
479
|
+
|
|
360
480
|
def list_audit_logs(ctx: Optional[dict], req: models.ListAuditLogsReq) -> models.ListAuditLogsData:
|
|
361
481
|
"""查询审计日志
|
|
362
482
|
查询审计日志
|
|
@@ -679,6 +799,36 @@ async def list_projects_with_sku_quotas_async(ctx: Optional[dict], req: models.L
|
|
|
679
799
|
return rsp.get_typed_data()
|
|
680
800
|
|
|
681
801
|
|
|
802
|
+
def list_quota_group_resource_pool_shared_nodes(ctx: Optional[dict], req: models.ListQuotaGroupResourcePoolSharedNodesReq) -> models.ListQuotaGroupResourcePoolSharedNodesData:
|
|
803
|
+
"""查询资源池下未关联配额组的节点列表
|
|
804
|
+
查询指定资源池下尚未关联到指定配额组的节点
|
|
805
|
+
GET /mc/v1alpha1/ListQuotaGroupResourcePoolSharedNodes
|
|
806
|
+
Action: ListQuotaGroupResourcePoolSharedNodes
|
|
807
|
+
|
|
808
|
+
Returns ListQuotaGroupResourcePoolSharedNodesData on success.
|
|
809
|
+
Raises YiCloudException on error.
|
|
810
|
+
"""
|
|
811
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListQuotaGroupResourcePoolSharedNodes"
|
|
812
|
+
rsp = msgs.Rsp[models.ListQuotaGroupResourcePoolSharedNodesData]()
|
|
813
|
+
client.base.get(ctx, path, req, rsp)
|
|
814
|
+
return rsp.get_typed_data()
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
async def list_quota_group_resource_pool_shared_nodes_async(ctx: Optional[dict], req: models.ListQuotaGroupResourcePoolSharedNodesReq) -> models.ListQuotaGroupResourcePoolSharedNodesData:
|
|
818
|
+
"""查询资源池下未关联配额组的节点列表(异步)
|
|
819
|
+
查询指定资源池下尚未关联到指定配额组的节点
|
|
820
|
+
GET /mc/v1alpha1/ListQuotaGroupResourcePoolSharedNodes
|
|
821
|
+
Action: ListQuotaGroupResourcePoolSharedNodes
|
|
822
|
+
|
|
823
|
+
Returns ListQuotaGroupResourcePoolSharedNodesData on success.
|
|
824
|
+
Raises YiCloudException on error.
|
|
825
|
+
"""
|
|
826
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListQuotaGroupResourcePoolSharedNodes"
|
|
827
|
+
rsp = msgs.Rsp[models.ListQuotaGroupResourcePoolSharedNodesData]()
|
|
828
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
829
|
+
return rsp.get_typed_data()
|
|
830
|
+
|
|
831
|
+
|
|
682
832
|
def list_quota_groups(ctx: Optional[dict], req: models.ListQuotaGroupsReq) -> models.ListQuotaGroupsData:
|
|
683
833
|
"""查看配额组列表
|
|
684
834
|
列出配额组(v1.9.0 资源池:出参新增 PoolId/PoolName/MachineCount/GpuModels(始终返回,未挂池为空值)与 PublicNetworks(机器 label 派生);PRD 优先级上限:出参 PriorityLimit(1-9,值越大优先级越高,默认 9))
|
|
@@ -813,6 +963,156 @@ async def list_quota_groups_under_tenant_async(ctx: Optional[dict], req: models.
|
|
|
813
963
|
return rsp.get_typed_data()
|
|
814
964
|
|
|
815
965
|
|
|
966
|
+
def list_resource_pool_assignable_nodes(ctx: Optional[dict], req: models.ListResourcePoolAssignableNodesReq) -> models.ListResourcePoolAssignableNodesData:
|
|
967
|
+
"""查询租户下可分配节点列表
|
|
968
|
+
查询当前租户下尚未分配到任何资源池的节点列表
|
|
969
|
+
GET /mc/v1alpha1/ListResourcePoolAssignableNodes
|
|
970
|
+
Action: ListResourcePoolAssignableNodes
|
|
971
|
+
|
|
972
|
+
Returns ListResourcePoolAssignableNodesData on success.
|
|
973
|
+
Raises YiCloudException on error.
|
|
974
|
+
"""
|
|
975
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolAssignableNodes"
|
|
976
|
+
rsp = msgs.Rsp[models.ListResourcePoolAssignableNodesData]()
|
|
977
|
+
client.base.get(ctx, path, req, rsp)
|
|
978
|
+
return rsp.get_typed_data()
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
async def list_resource_pool_assignable_nodes_async(ctx: Optional[dict], req: models.ListResourcePoolAssignableNodesReq) -> models.ListResourcePoolAssignableNodesData:
|
|
982
|
+
"""查询租户下可分配节点列表(异步)
|
|
983
|
+
查询当前租户下尚未分配到任何资源池的节点列表
|
|
984
|
+
GET /mc/v1alpha1/ListResourcePoolAssignableNodes
|
|
985
|
+
Action: ListResourcePoolAssignableNodes
|
|
986
|
+
|
|
987
|
+
Returns ListResourcePoolAssignableNodesData on success.
|
|
988
|
+
Raises YiCloudException on error.
|
|
989
|
+
"""
|
|
990
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolAssignableNodes"
|
|
991
|
+
rsp = msgs.Rsp[models.ListResourcePoolAssignableNodesData]()
|
|
992
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
993
|
+
return rsp.get_typed_data()
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
def list_resource_pool_instances(ctx: Optional[dict], req: models.ListResourcePoolInstancesReq) -> models.ListResourcePoolInstancesData:
|
|
997
|
+
"""查询资源池下实例列表
|
|
998
|
+
查询当前资源池下运行中的实例列表
|
|
999
|
+
GET /mc/v1alpha1/ListResourcePoolInstances
|
|
1000
|
+
Action: ListResourcePoolInstances
|
|
1001
|
+
|
|
1002
|
+
Returns ListResourcePoolInstancesData on success.
|
|
1003
|
+
Raises YiCloudException on error.
|
|
1004
|
+
"""
|
|
1005
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolInstances"
|
|
1006
|
+
rsp = msgs.Rsp[models.ListResourcePoolInstancesData]()
|
|
1007
|
+
client.base.get(ctx, path, req, rsp)
|
|
1008
|
+
return rsp.get_typed_data()
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
async def list_resource_pool_instances_async(ctx: Optional[dict], req: models.ListResourcePoolInstancesReq) -> models.ListResourcePoolInstancesData:
|
|
1012
|
+
"""查询资源池下实例列表(异步)
|
|
1013
|
+
查询当前资源池下运行中的实例列表
|
|
1014
|
+
GET /mc/v1alpha1/ListResourcePoolInstances
|
|
1015
|
+
Action: ListResourcePoolInstances
|
|
1016
|
+
|
|
1017
|
+
Returns ListResourcePoolInstancesData on success.
|
|
1018
|
+
Raises YiCloudException on error.
|
|
1019
|
+
"""
|
|
1020
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolInstances"
|
|
1021
|
+
rsp = msgs.Rsp[models.ListResourcePoolInstancesData]()
|
|
1022
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
1023
|
+
return rsp.get_typed_data()
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
def list_resource_pool_names(ctx: Optional[dict], req: models.ListResourcePoolNamesReq) -> models.ListResourcePoolNamesData:
|
|
1027
|
+
"""查询资源池名称列表
|
|
1028
|
+
查询资源池名称列表
|
|
1029
|
+
GET /mc/v1alpha1/ListResourcePoolNames
|
|
1030
|
+
Action: ListResourcePoolNames
|
|
1031
|
+
|
|
1032
|
+
Returns ListResourcePoolNamesData on success.
|
|
1033
|
+
Raises YiCloudException on error.
|
|
1034
|
+
"""
|
|
1035
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolNames"
|
|
1036
|
+
rsp = msgs.Rsp[models.ListResourcePoolNamesData]()
|
|
1037
|
+
client.base.get(ctx, path, req, rsp)
|
|
1038
|
+
return rsp.get_typed_data()
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
async def list_resource_pool_names_async(ctx: Optional[dict], req: models.ListResourcePoolNamesReq) -> models.ListResourcePoolNamesData:
|
|
1042
|
+
"""查询资源池名称列表(异步)
|
|
1043
|
+
查询资源池名称列表
|
|
1044
|
+
GET /mc/v1alpha1/ListResourcePoolNames
|
|
1045
|
+
Action: ListResourcePoolNames
|
|
1046
|
+
|
|
1047
|
+
Returns ListResourcePoolNamesData on success.
|
|
1048
|
+
Raises YiCloudException on error.
|
|
1049
|
+
"""
|
|
1050
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolNames"
|
|
1051
|
+
rsp = msgs.Rsp[models.ListResourcePoolNamesData]()
|
|
1052
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
1053
|
+
return rsp.get_typed_data()
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
def list_resource_pool_nodes(ctx: Optional[dict], req: models.ListResourcePoolNodesReq) -> models.ListResourcePoolNodesData:
|
|
1057
|
+
"""查询资源池下节点列表
|
|
1058
|
+
查询当前资源池下已添加的节点机器列表
|
|
1059
|
+
GET /mc/v1alpha1/ListResourcePoolNodes
|
|
1060
|
+
Action: ListResourcePoolNodes
|
|
1061
|
+
|
|
1062
|
+
Returns ListResourcePoolNodesData on success.
|
|
1063
|
+
Raises YiCloudException on error.
|
|
1064
|
+
"""
|
|
1065
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolNodes"
|
|
1066
|
+
rsp = msgs.Rsp[models.ListResourcePoolNodesData]()
|
|
1067
|
+
client.base.get(ctx, path, req, rsp)
|
|
1068
|
+
return rsp.get_typed_data()
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
async def list_resource_pool_nodes_async(ctx: Optional[dict], req: models.ListResourcePoolNodesReq) -> models.ListResourcePoolNodesData:
|
|
1072
|
+
"""查询资源池下节点列表(异步)
|
|
1073
|
+
查询当前资源池下已添加的节点机器列表
|
|
1074
|
+
GET /mc/v1alpha1/ListResourcePoolNodes
|
|
1075
|
+
Action: ListResourcePoolNodes
|
|
1076
|
+
|
|
1077
|
+
Returns ListResourcePoolNodesData on success.
|
|
1078
|
+
Raises YiCloudException on error.
|
|
1079
|
+
"""
|
|
1080
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePoolNodes"
|
|
1081
|
+
rsp = msgs.Rsp[models.ListResourcePoolNodesData]()
|
|
1082
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
1083
|
+
return rsp.get_typed_data()
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
def list_resource_pools(ctx: Optional[dict], req: models.ListResourcePoolsReq) -> models.ListResourcePoolsData:
|
|
1087
|
+
"""查询资源池列表
|
|
1088
|
+
查询资源池列表
|
|
1089
|
+
GET /mc/v1alpha1/ListResourcePools
|
|
1090
|
+
Action: ListResourcePools
|
|
1091
|
+
|
|
1092
|
+
Returns ListResourcePoolsData on success.
|
|
1093
|
+
Raises YiCloudException on error.
|
|
1094
|
+
"""
|
|
1095
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePools"
|
|
1096
|
+
rsp = msgs.Rsp[models.ListResourcePoolsData]()
|
|
1097
|
+
client.base.get(ctx, path, req, rsp)
|
|
1098
|
+
return rsp.get_typed_data()
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
async def list_resource_pools_async(ctx: Optional[dict], req: models.ListResourcePoolsReq) -> models.ListResourcePoolsData:
|
|
1102
|
+
"""查询资源池列表(异步)
|
|
1103
|
+
查询资源池列表
|
|
1104
|
+
GET /mc/v1alpha1/ListResourcePools
|
|
1105
|
+
Action: ListResourcePools
|
|
1106
|
+
|
|
1107
|
+
Returns ListResourcePoolsData on success.
|
|
1108
|
+
Raises YiCloudException on error.
|
|
1109
|
+
"""
|
|
1110
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListResourcePools"
|
|
1111
|
+
rsp = msgs.Rsp[models.ListResourcePoolsData]()
|
|
1112
|
+
await client.base.get_async(ctx, path, req, rsp)
|
|
1113
|
+
return rsp.get_typed_data()
|
|
1114
|
+
|
|
1115
|
+
|
|
816
1116
|
def list_skus(ctx: Optional[dict], req: models.ListSKUsReq) -> models.ListSKUsData:
|
|
817
1117
|
"""获取SKU列表
|
|
818
1118
|
获取SKU列表
|
|
@@ -929,6 +1229,96 @@ async def remove_project_user_async(ctx: Optional[dict], req: models.RemoveProje
|
|
|
929
1229
|
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
930
1230
|
|
|
931
1231
|
|
|
1232
|
+
def remove_resource_pool_machines(ctx: Optional[dict], req: models.RemoveResourcePoolMachinesReq) -> models.RemoveResourcePoolMachinesData:
|
|
1233
|
+
"""从资源池移除机器
|
|
1234
|
+
批量从资源池移除机器
|
|
1235
|
+
POST /mc/v1alpha1/RemoveResourcePoolMachines
|
|
1236
|
+
Action: RemoveResourcePoolMachines
|
|
1237
|
+
|
|
1238
|
+
Returns RemoveResourcePoolMachinesData on success.
|
|
1239
|
+
Raises YiCloudException on error.
|
|
1240
|
+
"""
|
|
1241
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/RemoveResourcePoolMachines"
|
|
1242
|
+
rsp = msgs.Rsp[models.RemoveResourcePoolMachinesData]()
|
|
1243
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1244
|
+
return rsp.get_typed_data()
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
async def remove_resource_pool_machines_async(ctx: Optional[dict], req: models.RemoveResourcePoolMachinesReq) -> models.RemoveResourcePoolMachinesData:
|
|
1248
|
+
"""从资源池移除机器(异步)
|
|
1249
|
+
批量从资源池移除机器
|
|
1250
|
+
POST /mc/v1alpha1/RemoveResourcePoolMachines
|
|
1251
|
+
Action: RemoveResourcePoolMachines
|
|
1252
|
+
|
|
1253
|
+
Returns RemoveResourcePoolMachinesData on success.
|
|
1254
|
+
Raises YiCloudException on error.
|
|
1255
|
+
"""
|
|
1256
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/RemoveResourcePoolMachines"
|
|
1257
|
+
rsp = msgs.Rsp[models.RemoveResourcePoolMachinesData]()
|
|
1258
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1259
|
+
return rsp.get_typed_data()
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
def set_resource_pool_gpu_node_limit(ctx: Optional[dict], req: models.SetResourcePoolGpuNodeLimitReq) -> models.SetResourcePoolGpuNodeLimitData:
|
|
1263
|
+
"""设置 GPU 通算上限
|
|
1264
|
+
设置 GPU 节点通算上限
|
|
1265
|
+
POST /mc/v1alpha1/SetResourcePoolGpuNodeLimit
|
|
1266
|
+
Action: SetResourcePoolGpuNodeLimit
|
|
1267
|
+
|
|
1268
|
+
Returns SetResourcePoolGpuNodeLimitData on success.
|
|
1269
|
+
Raises YiCloudException on error.
|
|
1270
|
+
"""
|
|
1271
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/SetResourcePoolGpuNodeLimit"
|
|
1272
|
+
rsp = msgs.Rsp[models.SetResourcePoolGpuNodeLimitData]()
|
|
1273
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1274
|
+
return rsp.get_typed_data()
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
async def set_resource_pool_gpu_node_limit_async(ctx: Optional[dict], req: models.SetResourcePoolGpuNodeLimitReq) -> models.SetResourcePoolGpuNodeLimitData:
|
|
1278
|
+
"""设置 GPU 通算上限(异步)
|
|
1279
|
+
设置 GPU 节点通算上限
|
|
1280
|
+
POST /mc/v1alpha1/SetResourcePoolGpuNodeLimit
|
|
1281
|
+
Action: SetResourcePoolGpuNodeLimit
|
|
1282
|
+
|
|
1283
|
+
Returns SetResourcePoolGpuNodeLimitData on success.
|
|
1284
|
+
Raises YiCloudException on error.
|
|
1285
|
+
"""
|
|
1286
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/SetResourcePoolGpuNodeLimit"
|
|
1287
|
+
rsp = msgs.Rsp[models.SetResourcePoolGpuNodeLimitData]()
|
|
1288
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1289
|
+
return rsp.get_typed_data()
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
def set_resource_pool_machine_schedulable(ctx: Optional[dict], req: models.SetResourcePoolMachineSchedulableReq) -> models.SetResourcePoolMachineSchedulableData:
|
|
1293
|
+
"""设置机器可调度状态
|
|
1294
|
+
设置/取消池内单台机器可调度状态
|
|
1295
|
+
POST /mc/v1alpha1/SetResourcePoolMachineSchedulable
|
|
1296
|
+
Action: SetResourcePoolMachineSchedulable
|
|
1297
|
+
|
|
1298
|
+
Returns SetResourcePoolMachineSchedulableData on success.
|
|
1299
|
+
Raises YiCloudException on error.
|
|
1300
|
+
"""
|
|
1301
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/SetResourcePoolMachineSchedulable"
|
|
1302
|
+
rsp = msgs.Rsp[models.SetResourcePoolMachineSchedulableData]()
|
|
1303
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1304
|
+
return rsp.get_typed_data()
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
async def set_resource_pool_machine_schedulable_async(ctx: Optional[dict], req: models.SetResourcePoolMachineSchedulableReq) -> models.SetResourcePoolMachineSchedulableData:
|
|
1308
|
+
"""设置机器可调度状态(异步)
|
|
1309
|
+
设置/取消池内单台机器可调度状态
|
|
1310
|
+
POST /mc/v1alpha1/SetResourcePoolMachineSchedulable
|
|
1311
|
+
Action: SetResourcePoolMachineSchedulable
|
|
1312
|
+
|
|
1313
|
+
Returns SetResourcePoolMachineSchedulableData on success.
|
|
1314
|
+
Raises YiCloudException on error.
|
|
1315
|
+
"""
|
|
1316
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/SetResourcePoolMachineSchedulable"
|
|
1317
|
+
rsp = msgs.Rsp[models.SetResourcePoolMachineSchedulableData]()
|
|
1318
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1319
|
+
return rsp.get_typed_data()
|
|
1320
|
+
|
|
1321
|
+
|
|
932
1322
|
def update_project(ctx: Optional[dict], req: models.UpdateProjectReq):
|
|
933
1323
|
"""更新项目
|
|
934
1324
|
更新项目配额
|
|
@@ -984,3 +1374,33 @@ async def update_quota_group_async(ctx: Optional[dict], req: models.UpdateQuotaG
|
|
|
984
1374
|
rsp = msgs.Rsp[None].empty()
|
|
985
1375
|
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
986
1376
|
|
|
1377
|
+
|
|
1378
|
+
def update_resource_pool(ctx: Optional[dict], req: models.UpdateResourcePoolReq) -> models.UpdateResourcePoolData:
|
|
1379
|
+
"""更新资源池
|
|
1380
|
+
更新资源池描述/标签
|
|
1381
|
+
POST /mc/v1alpha1/UpdateResourcePool
|
|
1382
|
+
Action: UpdateResourcePool
|
|
1383
|
+
|
|
1384
|
+
Returns UpdateResourcePoolData on success.
|
|
1385
|
+
Raises YiCloudException on error.
|
|
1386
|
+
"""
|
|
1387
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/UpdateResourcePool"
|
|
1388
|
+
rsp = msgs.Rsp[models.UpdateResourcePoolData]()
|
|
1389
|
+
client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1390
|
+
return rsp.get_typed_data()
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
async def update_resource_pool_async(ctx: Optional[dict], req: models.UpdateResourcePoolReq) -> models.UpdateResourcePoolData:
|
|
1394
|
+
"""更新资源池(异步)
|
|
1395
|
+
更新资源池描述/标签
|
|
1396
|
+
POST /mc/v1alpha1/UpdateResourcePool
|
|
1397
|
+
Action: UpdateResourcePool
|
|
1398
|
+
|
|
1399
|
+
Returns UpdateResourcePoolData on success.
|
|
1400
|
+
Raises YiCloudException on error.
|
|
1401
|
+
"""
|
|
1402
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/UpdateResourcePool"
|
|
1403
|
+
rsp = msgs.Rsp[models.UpdateResourcePoolData]()
|
|
1404
|
+
await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
|
|
1405
|
+
return rsp.get_typed_data()
|
|
1406
|
+
|