@daocloud-proto/baize 0.101.1 → 0.101.2
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.
|
@@ -57,6 +57,36 @@ export type ListPVCsResponse = {
|
|
|
57
57
|
page?: BaizeCommonCommon.Pagination
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export type GPUSetting = {
|
|
61
|
+
type?: string
|
|
62
|
+
alias?: string
|
|
63
|
+
resource?: GPUResourceSetting[]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type GPUResourceSetting = {
|
|
67
|
+
key?: string
|
|
68
|
+
alias?: string
|
|
69
|
+
isAllocatable?: boolean
|
|
70
|
+
description?: string
|
|
71
|
+
aliasZh?: string
|
|
72
|
+
range?: ResourceRange
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type ResourceRange = {
|
|
76
|
+
min?: number
|
|
77
|
+
minDesc?: string
|
|
78
|
+
max?: number
|
|
79
|
+
maxDesc?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type GPUSettingsResponse = {
|
|
83
|
+
items?: GPUSetting[]
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type ClusterSettingsRequest = {
|
|
87
|
+
cluster?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
60
90
|
export class ClusterService {
|
|
61
91
|
static ListClusters(req: ListAIClustersRequest, initReq?: fm.InitReq): Promise<ListAIClustersResponse> {
|
|
62
92
|
return fm.fetchReq<ListAIClustersRequest, ListAIClustersResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -67,4 +97,7 @@ export class ClusterService {
|
|
|
67
97
|
static ListPVCs(req: ListPVCsRequest, initReq?: fm.InitReq): Promise<ListPVCsResponse> {
|
|
68
98
|
return fm.fetchReq<ListPVCsRequest, ListPVCsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/pvcs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
69
99
|
}
|
|
100
|
+
static GetClusterGPUSettings(req: ClusterSettingsRequest, initReq?: fm.InitReq): Promise<GPUSettingsResponse> {
|
|
101
|
+
return fm.fetchReq<ClusterSettingsRequest, GPUSettingsResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/settings/gpu-resources?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
102
|
+
}
|
|
70
103
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
|
|
10
|
+
export enum QueueType {
|
|
11
|
+
QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
|
|
12
|
+
KUEUE = "KUEUE",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum QueuePhase {
|
|
16
|
+
QUEUE_PHASE_UNSPECIFIED = "QUEUE_PHASE_UNSPECIFIED",
|
|
17
|
+
READY = "READY",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type QueueResource = {
|
|
21
|
+
name?: string
|
|
22
|
+
value?: string
|
|
23
|
+
borrowingLimit?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type QueueStatus = {
|
|
27
|
+
phase?: QueuePhase
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Queue = {
|
|
31
|
+
type?: QueueType
|
|
32
|
+
cluster?: string
|
|
33
|
+
name?: string
|
|
34
|
+
workspace?: number
|
|
35
|
+
description?: string
|
|
36
|
+
resources?: QueueResource[]
|
|
37
|
+
status?: QueueStatus
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ListQueueRequest = {
|
|
41
|
+
cluster?: string
|
|
42
|
+
type?: QueueType
|
|
43
|
+
page?: BaizeCommonCommon.Pagination
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ListQueueResponse = {
|
|
47
|
+
items?: Queue[]
|
|
48
|
+
page?: BaizeCommonCommon.Pagination
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type CreateQueueRequest = {
|
|
52
|
+
type?: QueueType
|
|
53
|
+
cluster?: string
|
|
54
|
+
name?: string
|
|
55
|
+
workspace?: number
|
|
56
|
+
description?: string
|
|
57
|
+
resources?: QueueResource[]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type DeleteQueueRequest = {
|
|
61
|
+
type?: QueueType
|
|
62
|
+
cluster?: string
|
|
63
|
+
name?: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export class QueueManagement {
|
|
67
|
+
static ListQueues(req: ListQueueRequest, initReq?: fm.InitReq): Promise<ListQueueResponse> {
|
|
68
|
+
return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
69
|
+
}
|
|
70
|
+
static CreateQueue(req: CreateQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
71
|
+
return fm.fetchReq<CreateQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
72
|
+
}
|
|
73
|
+
static DeleteQueue(req: DeleteQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
74
|
+
return fm.fetchReq<DeleteQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
75
|
+
}
|
|
76
|
+
}
|