@daocloud-proto/hydra 0.11.0-dev-8 → 0.11.0-dev-13
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.
|
@@ -8,6 +8,24 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
import * as EventV1alpha1Event from "../../../management-api/event/v1alpha1/event.pb"
|
|
12
|
+
import * as HydraManagement_apiStorageV1alpha1Filesstorage from "../../../management-api/storage/v1alpha1/filesstorage.pb"
|
|
13
|
+
import * as HydraStorageserverV1alpha1Storage_server from "../../../storageserver/v1alpha1/storage_server.pb"
|
|
14
|
+
|
|
15
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
16
|
+
type OneOf<T> =
|
|
17
|
+
| { [k in keyof T]?: undefined }
|
|
18
|
+
| (
|
|
19
|
+
keyof T extends infer K ?
|
|
20
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
21
|
+
: never)
|
|
22
|
+
: never);
|
|
23
|
+
|
|
24
|
+
export enum PrePullActionRequestAction {
|
|
25
|
+
ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
|
|
26
|
+
RERUN = "RERUN",
|
|
27
|
+
}
|
|
28
|
+
|
|
11
29
|
export type FilesStorageStatus = {
|
|
12
30
|
phase?: string
|
|
13
31
|
reason?: string
|
|
@@ -63,18 +81,19 @@ export type DeleteFilesStorageRequest = {
|
|
|
63
81
|
|
|
64
82
|
export type FileInfo = {
|
|
65
83
|
name?: string
|
|
66
|
-
|
|
84
|
+
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
67
85
|
size?: string
|
|
68
|
-
|
|
86
|
+
modificationTimestamp?: string
|
|
69
87
|
}
|
|
70
88
|
|
|
71
89
|
export type ListFilesRequest = {
|
|
72
90
|
name?: string
|
|
73
91
|
path?: string
|
|
92
|
+
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
74
93
|
}
|
|
75
94
|
|
|
76
95
|
export type ListFilesResponse = {
|
|
77
|
-
|
|
96
|
+
files?: FileInfo[]
|
|
78
97
|
}
|
|
79
98
|
|
|
80
99
|
export type CreateFolderRequest = {
|
|
@@ -83,37 +102,81 @@ export type CreateFolderRequest = {
|
|
|
83
102
|
path?: string
|
|
84
103
|
}
|
|
85
104
|
|
|
86
|
-
export type
|
|
87
|
-
|
|
88
|
-
|
|
105
|
+
export type ListPrePullsRequest = {
|
|
106
|
+
storageName?: string
|
|
107
|
+
cluster?: string
|
|
108
|
+
page?: HydraCommonCommon.Pagination
|
|
89
109
|
}
|
|
90
110
|
|
|
91
|
-
export type
|
|
92
|
-
|
|
111
|
+
export type ListPrePullsResponse = {
|
|
112
|
+
items?: HydraManagement_apiStorageV1alpha1Filesstorage.PrePull[]
|
|
93
113
|
page?: HydraCommonCommon.Pagination
|
|
94
114
|
}
|
|
95
115
|
|
|
96
|
-
export type
|
|
97
|
-
|
|
98
|
-
|
|
116
|
+
export type CreatePrePullRequest = {
|
|
117
|
+
prepullName?: string
|
|
118
|
+
cluster?: string
|
|
119
|
+
path?: string
|
|
120
|
+
storageName?: string
|
|
121
|
+
description?: string
|
|
122
|
+
labels?: {[key: string]: string}
|
|
123
|
+
annotations?: {[key: string]: string}
|
|
124
|
+
source?: HydraManagement_apiStorageV1alpha1Filesstorage.DataSource
|
|
125
|
+
secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
|
|
99
126
|
}
|
|
100
127
|
|
|
101
|
-
|
|
102
|
-
|
|
128
|
+
|
|
129
|
+
type BaseUpdatePrePullRequest = {
|
|
130
|
+
cluster?: string
|
|
131
|
+
storageName?: string
|
|
132
|
+
prepullName?: string
|
|
133
|
+
description?: string
|
|
134
|
+
labels?: {[key: string]: string}
|
|
135
|
+
annotations?: {[key: string]: string}
|
|
136
|
+
secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
|
|
137
|
+
path?: string
|
|
103
138
|
}
|
|
104
139
|
|
|
105
|
-
export type
|
|
106
|
-
|
|
140
|
+
export type UpdatePrePullRequest = BaseUpdatePrePullRequest
|
|
141
|
+
& OneOf<{ git: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsGit; s3: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsS3; http: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsHttp; huggingFace: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsHuggingFace; modelScope: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsModelScope }>
|
|
142
|
+
|
|
143
|
+
export type DeletePrePullRequest = {
|
|
144
|
+
storageName?: string
|
|
107
145
|
prepullName?: string
|
|
108
146
|
}
|
|
109
147
|
|
|
110
|
-
export type
|
|
111
|
-
|
|
148
|
+
export type PrePullActionRequest = {
|
|
149
|
+
cluster?: string
|
|
150
|
+
storageName?: string
|
|
112
151
|
prepullName?: string
|
|
152
|
+
action?: PrePullActionRequestAction
|
|
113
153
|
}
|
|
114
154
|
|
|
115
|
-
export type
|
|
116
|
-
|
|
155
|
+
export type RestartPrePullRequest = {
|
|
156
|
+
storageName?: string
|
|
157
|
+
prepullName?: string
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type ValidateDataSourceSecretsRequest = {
|
|
161
|
+
source?: HydraManagement_apiStorageV1alpha1Filesstorage.DataSource
|
|
162
|
+
secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type ValidateDataSourceSecretsResponse = {
|
|
166
|
+
valid?: boolean
|
|
167
|
+
message?: string
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type ListDatasetEventsRequest = {
|
|
171
|
+
cluster?: string
|
|
172
|
+
storageName?: string
|
|
173
|
+
prepullName?: string
|
|
174
|
+
page?: HydraCommonCommon.Pagination
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type SinglePrePullRequest = {
|
|
178
|
+
cluster?: string
|
|
179
|
+
storageName?: string
|
|
117
180
|
prepullName?: string
|
|
118
181
|
}
|
|
119
182
|
|
|
@@ -139,19 +202,31 @@ export class AdminFilesStorageService {
|
|
|
139
202
|
static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
140
203
|
return fm.fetchReq<CreateFolderRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/folders/${req["folderName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
141
204
|
}
|
|
142
|
-
static
|
|
143
|
-
return fm.fetchReq<
|
|
205
|
+
static ListPrePulls(req: ListPrePullsRequest, initReq?: fm.InitReq): Promise<ListPrePullsResponse> {
|
|
206
|
+
return fm.fetchReq<ListPrePullsRequest, ListPrePullsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls?${fm.renderURLSearchParams(req, ["storageName"])}`, {...initReq, method: "GET"})
|
|
207
|
+
}
|
|
208
|
+
static CreatePrePull(req: CreatePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
|
|
209
|
+
return fm.fetchReq<CreatePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
210
|
+
}
|
|
211
|
+
static UpdatePrePull(req: UpdatePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
|
|
212
|
+
return fm.fetchReq<UpdatePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
213
|
+
}
|
|
214
|
+
static DeletePrePull(req: DeletePrePullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
215
|
+
return fm.fetchReq<DeletePrePullRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
|
|
216
|
+
}
|
|
217
|
+
static DatasetDoAction(req: PrePullActionRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
|
|
218
|
+
return fm.fetchReq<PrePullActionRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
144
219
|
}
|
|
145
|
-
static
|
|
146
|
-
return fm.fetchReq<
|
|
220
|
+
static ListPrePullEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<EventV1alpha1Event.ListEventsResponse> {
|
|
221
|
+
return fm.fetchReq<ListDatasetEventsRequest, EventV1alpha1Event.ListEventsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/events?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
147
222
|
}
|
|
148
|
-
static
|
|
149
|
-
return fm.fetchReq<
|
|
223
|
+
static GetPrePullSyncProcess(req: SinglePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePullSyncProcess> {
|
|
224
|
+
return fm.fetchReq<SinglePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePullSyncProcess>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/sync-process?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
150
225
|
}
|
|
151
|
-
static
|
|
152
|
-
return fm.fetchReq<
|
|
226
|
+
static ValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
|
|
227
|
+
return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
153
228
|
}
|
|
154
|
-
static
|
|
155
|
-
return fm.fetchReq<
|
|
229
|
+
static GetPodInstanceList(req: HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse> {
|
|
230
|
+
return fm.fetchReq<HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/pods?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
156
231
|
}
|
|
157
232
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 HydraCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
|
+
|
|
10
|
+
export enum EventObjKind {
|
|
11
|
+
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
12
|
+
DATASET = "DATASET",
|
|
13
|
+
POD = "POD",
|
|
14
|
+
UNKNOWN = "UNKNOWN",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum EventType {
|
|
18
|
+
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
19
|
+
NORMAL = "NORMAL",
|
|
20
|
+
WARNING = "WARNING",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type Event = {
|
|
24
|
+
objKind?: EventObjKind
|
|
25
|
+
objName?: string
|
|
26
|
+
objNamespace?: string
|
|
27
|
+
type?: EventType
|
|
28
|
+
message?: string
|
|
29
|
+
reason?: string
|
|
30
|
+
firstTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
31
|
+
lastTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
32
|
+
count?: number
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type ListEventsResponse = {
|
|
36
|
+
items?: Event[]
|
|
37
|
+
page?: HydraCommonCommon.Pagination
|
|
38
|
+
}
|
|
@@ -8,6 +8,60 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
import * as HydraStorageserverV1alpha1Storage_server from "../../../storageserver/v1alpha1/storage_server.pb"
|
|
12
|
+
import * as EventV1alpha1Event from "../../event/v1alpha1/event.pb"
|
|
13
|
+
|
|
14
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
15
|
+
type OneOf<T> =
|
|
16
|
+
| { [k in keyof T]?: undefined }
|
|
17
|
+
| (
|
|
18
|
+
keyof T extends infer K ?
|
|
19
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
20
|
+
: never)
|
|
21
|
+
: never);
|
|
22
|
+
|
|
23
|
+
export enum DataSourceType {
|
|
24
|
+
DATA_SOURCE_TYPE_UNSPECIFIED = "DATA_SOURCE_TYPE_UNSPECIFIED",
|
|
25
|
+
GIT = "GIT",
|
|
26
|
+
S3 = "S3",
|
|
27
|
+
HTTP = "HTTP",
|
|
28
|
+
HUGGING_FACE = "HUGGING_FACE",
|
|
29
|
+
MODEL_SCOPE = "MODEL_SCOPE",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export enum SecretOptionsAuthType {
|
|
33
|
+
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
34
|
+
BASIC = "BASIC",
|
|
35
|
+
SSH = "SSH",
|
|
36
|
+
TOKEN = "TOKEN",
|
|
37
|
+
AK_SK = "AK_SK",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum DataSourceOptionsSyncMode {
|
|
41
|
+
SYNC_MODE_UNSPECIFIED = "SYNC_MODE_UNSPECIFIED",
|
|
42
|
+
copy = "copy",
|
|
43
|
+
sync = "sync",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum DataSourceOptionsS3Provider {
|
|
47
|
+
PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
|
|
48
|
+
AWS = "AWS",
|
|
49
|
+
MINIO = "MINIO",
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export enum DatasetStatusPhase {
|
|
53
|
+
DATA_SET_PHASE_UNSPECIFIED = "DATA_SET_PHASE_UNSPECIFIED",
|
|
54
|
+
PENDING = "PENDING",
|
|
55
|
+
READY = "READY",
|
|
56
|
+
PROCESSING = "PROCESSING",
|
|
57
|
+
FAILED = "FAILED",
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export enum PrePullActionRequestAction {
|
|
61
|
+
ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
|
|
62
|
+
RERUN = "RERUN",
|
|
63
|
+
}
|
|
64
|
+
|
|
11
65
|
export type FilesStorageStatus = {
|
|
12
66
|
phase?: string
|
|
13
67
|
reason?: string
|
|
@@ -69,19 +123,20 @@ export type DeleteFilesStorageRequest = {
|
|
|
69
123
|
|
|
70
124
|
export type FileInfo = {
|
|
71
125
|
name?: string
|
|
72
|
-
|
|
126
|
+
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
73
127
|
size?: string
|
|
74
|
-
|
|
128
|
+
modificationTimestamp?: string
|
|
75
129
|
}
|
|
76
130
|
|
|
77
131
|
export type ListFilesRequest = {
|
|
78
132
|
workspace?: number
|
|
79
133
|
name?: string
|
|
80
134
|
path?: string
|
|
135
|
+
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
81
136
|
}
|
|
82
137
|
|
|
83
138
|
export type ListFilesResponse = {
|
|
84
|
-
|
|
139
|
+
files?: FileInfo[]
|
|
85
140
|
}
|
|
86
141
|
|
|
87
142
|
export type CreateFolderRequest = {
|
|
@@ -91,43 +146,212 @@ export type CreateFolderRequest = {
|
|
|
91
146
|
path?: string
|
|
92
147
|
}
|
|
93
148
|
|
|
94
|
-
export type
|
|
149
|
+
export type DataSource = {
|
|
150
|
+
type?: DataSourceType
|
|
151
|
+
uri?: string
|
|
152
|
+
options?: DataSourceOptions
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type SecretOptionsBasicAuth = {
|
|
156
|
+
username?: string
|
|
157
|
+
password?: string
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type SecretOptionsSSHAuth = {
|
|
161
|
+
privateKey?: string
|
|
162
|
+
passphrase?: string
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type SecretOptionsTokenAuth = {
|
|
166
|
+
token?: string
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type SecretOptionsAkSkAuth = {
|
|
170
|
+
accessKey?: string
|
|
171
|
+
secretKey?: string
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/* hydra modified */ export type BaseSecretOptions = {
|
|
176
|
+
authType?: SecretOptionsAuthType
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type SecretOptions = BaseSecretOptions
|
|
180
|
+
& OneOf<{ basic: SecretOptionsBasicAuth; ssh: SecretOptionsSSHAuth; token: SecretOptionsTokenAuth; akSk: SecretOptionsAkSkAuth }>
|
|
181
|
+
|
|
182
|
+
export type DataSourceOptionsGit = {
|
|
183
|
+
branch?: string
|
|
184
|
+
commit?: string
|
|
185
|
+
depth?: number
|
|
186
|
+
submodules?: boolean
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export type DataSourceOptionsS3 = {
|
|
190
|
+
region?: string
|
|
191
|
+
endpoint?: string
|
|
192
|
+
provider?: DataSourceOptionsS3Provider
|
|
193
|
+
syncMode?: DataSourceOptionsSyncMode
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type DataSourceOptionsHttp = {
|
|
197
|
+
headers?: {[key: string]: string}
|
|
198
|
+
syncMode?: DataSourceOptionsSyncMode
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/* hydra modified */ export type BaseDataSourceOptions = {
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type DataSourceOptions = BaseDataSourceOptions
|
|
206
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
|
|
207
|
+
|
|
208
|
+
export type DataSourceOptionsHuggingFace = {
|
|
209
|
+
endpoint?: string
|
|
210
|
+
include?: string
|
|
211
|
+
exclude?: string
|
|
212
|
+
revision?: string
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export type DataSourceOptionsModelScope = {
|
|
216
|
+
include?: string
|
|
217
|
+
exclude?: string
|
|
218
|
+
revision?: string
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type DatasetStatus = {
|
|
222
|
+
phase?: DatasetStatusPhase
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type PrePull = {
|
|
95
226
|
name?: string
|
|
96
|
-
|
|
227
|
+
cluster?: string
|
|
228
|
+
namespace?: string
|
|
229
|
+
path?: string
|
|
230
|
+
storageName?: string
|
|
231
|
+
description?: string
|
|
232
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
233
|
+
labels?: {[key: string]: string}
|
|
234
|
+
annotations?: {[key: string]: string}
|
|
235
|
+
source?: DataSource
|
|
236
|
+
status?: DatasetStatus
|
|
237
|
+
lastSync?: GoogleProtobufTimestamp.Timestamp
|
|
238
|
+
secretRef?: string
|
|
239
|
+
workspace?: number
|
|
97
240
|
}
|
|
98
241
|
|
|
99
|
-
export type
|
|
242
|
+
export type ListPrePullsRequest = {
|
|
243
|
+
storageName?: string
|
|
100
244
|
workspace?: number
|
|
101
|
-
|
|
245
|
+
cluster?: string
|
|
102
246
|
page?: HydraCommonCommon.Pagination
|
|
103
247
|
}
|
|
104
248
|
|
|
105
|
-
export type
|
|
106
|
-
items?:
|
|
249
|
+
export type ListPrePullsResponse = {
|
|
250
|
+
items?: PrePull[]
|
|
107
251
|
page?: HydraCommonCommon.Pagination
|
|
108
252
|
}
|
|
109
253
|
|
|
110
|
-
export type
|
|
254
|
+
export type CreatePrePullRequest = {
|
|
255
|
+
prepullName?: string
|
|
256
|
+
cluster?: string
|
|
257
|
+
path?: string
|
|
258
|
+
storageName?: string
|
|
259
|
+
description?: string
|
|
260
|
+
labels?: {[key: string]: string}
|
|
261
|
+
annotations?: {[key: string]: string}
|
|
262
|
+
source?: DataSource
|
|
263
|
+
secretOptions?: SecretOptions
|
|
264
|
+
workspace?: number
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
/* hydra modified */ export type BaseUpdatePrePullRequest = {
|
|
269
|
+
cluster?: string
|
|
270
|
+
storageName?: string
|
|
271
|
+
prepullName?: string
|
|
272
|
+
description?: string
|
|
273
|
+
labels?: {[key: string]: string}
|
|
274
|
+
annotations?: {[key: string]: string}
|
|
275
|
+
secretOptions?: SecretOptions
|
|
111
276
|
workspace?: number
|
|
112
|
-
|
|
277
|
+
path?: string
|
|
113
278
|
}
|
|
114
279
|
|
|
115
|
-
export type
|
|
280
|
+
export type UpdatePrePullRequest = BaseUpdatePrePullRequest
|
|
281
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
|
|
282
|
+
|
|
283
|
+
export type DeletePrePullRequest = {
|
|
284
|
+
storageName?: string
|
|
285
|
+
prepullName?: string
|
|
116
286
|
workspace?: number
|
|
117
|
-
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export type PrePullActionRequest = {
|
|
290
|
+
cluster?: string
|
|
291
|
+
storageName?: string
|
|
118
292
|
prepullName?: string
|
|
293
|
+
action?: PrePullActionRequestAction
|
|
294
|
+
workspace?: number
|
|
119
295
|
}
|
|
120
296
|
|
|
121
|
-
export type
|
|
297
|
+
export type ValidateDataSourceSecretsRequest = {
|
|
298
|
+
source?: DataSource
|
|
299
|
+
secretOptions?: SecretOptions
|
|
122
300
|
workspace?: number
|
|
123
|
-
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export type ValidateDataSourceSecretsResponse = {
|
|
304
|
+
valid?: boolean
|
|
305
|
+
message?: string
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export type ListDatasetEventsRequest = {
|
|
309
|
+
cluster?: string
|
|
310
|
+
storageName?: string
|
|
311
|
+
prepullName?: string
|
|
312
|
+
page?: HydraCommonCommon.Pagination
|
|
313
|
+
workspace?: number
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export type SinglePrePullRequest = {
|
|
317
|
+
cluster?: string
|
|
318
|
+
storageName?: string
|
|
124
319
|
prepullName?: string
|
|
320
|
+
workspace?: number
|
|
125
321
|
}
|
|
126
322
|
|
|
127
|
-
export type
|
|
323
|
+
export type PrePullSyncProcess = {
|
|
324
|
+
status?: DatasetStatus
|
|
325
|
+
syncProcess?: number
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export type PodRequest = {
|
|
128
329
|
workspace?: number
|
|
129
|
-
|
|
330
|
+
storageName?: string
|
|
130
331
|
prepullName?: string
|
|
332
|
+
page?: HydraCommonCommon.Pagination
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export type PodInstance = {
|
|
336
|
+
cluster?: string
|
|
337
|
+
namespace?: string
|
|
338
|
+
name?: string
|
|
339
|
+
phase?: string
|
|
340
|
+
containerReadyCount?: number
|
|
341
|
+
containerTotalCount?: number
|
|
342
|
+
podIp?: string
|
|
343
|
+
nodeName?: string
|
|
344
|
+
containers?: Container[]
|
|
345
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export type Container = {
|
|
349
|
+
name?: string
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export type PodInstanceListResponse = {
|
|
353
|
+
items?: PodInstance[]
|
|
354
|
+
page?: HydraCommonCommon.Pagination
|
|
131
355
|
}
|
|
132
356
|
|
|
133
357
|
export class WSFilesStorageService {
|
|
@@ -152,19 +376,31 @@ export class WSFilesStorageService {
|
|
|
152
376
|
static CreateWSFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
153
377
|
return fm.fetchReq<CreateFolderRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/folders/${req["folderName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
154
378
|
}
|
|
155
|
-
static
|
|
156
|
-
return fm.fetchReq<
|
|
379
|
+
static WSListPrePulls(req: ListPrePullsRequest, initReq?: fm.InitReq): Promise<ListPrePullsResponse> {
|
|
380
|
+
return fm.fetchReq<ListPrePullsRequest, ListPrePullsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls?${fm.renderURLSearchParams(req, ["workspace", "storageName"])}`, {...initReq, method: "GET"})
|
|
381
|
+
}
|
|
382
|
+
static WSCreatePrePull(req: CreatePrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
|
|
383
|
+
return fm.fetchReq<CreatePrePullRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
384
|
+
}
|
|
385
|
+
static WSUpdatePrePull(req: UpdatePrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
|
|
386
|
+
return fm.fetchReq<UpdatePrePullRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
387
|
+
}
|
|
388
|
+
static WSDeletePrePull(req: DeletePrePullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
389
|
+
return fm.fetchReq<DeletePrePullRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
|
|
390
|
+
}
|
|
391
|
+
static WSDatasetDoAction(req: PrePullActionRequest, initReq?: fm.InitReq): Promise<PrePull> {
|
|
392
|
+
return fm.fetchReq<PrePullActionRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
157
393
|
}
|
|
158
|
-
static
|
|
159
|
-
return fm.fetchReq<
|
|
394
|
+
static WSListPrePullEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<EventV1alpha1Event.ListEventsResponse> {
|
|
395
|
+
return fm.fetchReq<ListDatasetEventsRequest, EventV1alpha1Event.ListEventsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/events?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
160
396
|
}
|
|
161
|
-
static
|
|
162
|
-
return fm.fetchReq<
|
|
397
|
+
static WSGetPrePullSyncProcess(req: SinglePrePullRequest, initReq?: fm.InitReq): Promise<PrePullSyncProcess> {
|
|
398
|
+
return fm.fetchReq<SinglePrePullRequest, PrePullSyncProcess>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/sync-process?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
163
399
|
}
|
|
164
|
-
static
|
|
165
|
-
return fm.fetchReq<
|
|
400
|
+
static WSValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
|
|
401
|
+
return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
166
402
|
}
|
|
167
|
-
static
|
|
168
|
-
return fm.fetchReq<
|
|
403
|
+
static WSGetPodInstanceList(req: PodRequest, initReq?: fm.InitReq): Promise<PodInstanceListResponse> {
|
|
404
|
+
return fm.fetchReq<PodRequest, PodInstanceListResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/pods?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
169
405
|
}
|
|
170
406
|
}
|