@daocloud-proto/virtnest 0.1.10-dev5 → 0.2.0-dev1
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.
- package/package.json +1 -1
- package/v1alpha1/feature_gate.pb.ts +38 -0
- package/v1alpha1/vm.pb.ts +127 -1
package/package.json
CHANGED
|
@@ -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 fm from "../fetch.pb"
|
|
8
|
+
|
|
9
|
+
export enum FeatureGateID {
|
|
10
|
+
Snapshot = "Snapshot",
|
|
11
|
+
Clone = "Clone",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum FeatureGateStatus {
|
|
15
|
+
Ready = "Ready",
|
|
16
|
+
Pending = "Pending",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type FeatureGateInfo = {
|
|
20
|
+
id?: FeatureGateID
|
|
21
|
+
name?: string
|
|
22
|
+
description?: string
|
|
23
|
+
enabled?: boolean
|
|
24
|
+
status?: FeatureGateStatus
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type ListFeatureGatesRequest = {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type ListFeatureGatesResponse = {
|
|
31
|
+
items?: FeatureGateInfo[]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class FeatureGate {
|
|
35
|
+
static ListFeatureGates(req: ListFeatureGatesRequest, initReq?: fm.InitReq): Promise<ListFeatureGatesResponse> {
|
|
36
|
+
return fm.fetchReq<ListFeatureGatesRequest, ListFeatureGatesResponse>(`/apis/virtnest.io/v1alpha1/feature-gate?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
37
|
+
}
|
|
38
|
+
}
|
package/v1alpha1/vm.pb.ts
CHANGED
|
@@ -32,6 +32,12 @@ export enum VMStatus {
|
|
|
32
32
|
poweroff = "poweroff",
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export enum StorageStatus {
|
|
36
|
+
storage_processing = "storage_processing",
|
|
37
|
+
storage_ready = "storage_ready",
|
|
38
|
+
storage_failed = "storage_failed",
|
|
39
|
+
}
|
|
40
|
+
|
|
35
41
|
export enum StorageType {
|
|
36
42
|
system = "system",
|
|
37
43
|
data = "data",
|
|
@@ -51,6 +57,11 @@ export type Pagination = {
|
|
|
51
57
|
total?: number
|
|
52
58
|
}
|
|
53
59
|
|
|
60
|
+
export type VmErrorMessage = {
|
|
61
|
+
message?: string
|
|
62
|
+
reason?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
54
65
|
export type ListClusterVmsInfo = {
|
|
55
66
|
name?: string
|
|
56
67
|
status?: VMStatus
|
|
@@ -60,6 +71,7 @@ export type ListClusterVmsInfo = {
|
|
|
60
71
|
memory?: string
|
|
61
72
|
createdAt?: string
|
|
62
73
|
osFamily?: OSFamily
|
|
74
|
+
vmErrorMessage?: VmErrorMessage
|
|
63
75
|
}
|
|
64
76
|
|
|
65
77
|
export type ListClusterVMsRequest = {
|
|
@@ -188,6 +200,8 @@ export type VMStorage = {
|
|
|
188
200
|
name?: string
|
|
189
201
|
type?: StorageType
|
|
190
202
|
capacity?: string
|
|
203
|
+
status?: StorageStatus
|
|
204
|
+
storageClass?: string
|
|
191
205
|
}
|
|
192
206
|
|
|
193
207
|
export type ListVMStoragesRequest = {
|
|
@@ -225,6 +239,26 @@ export type ListVMSnapshotsResponse = {
|
|
|
225
239
|
pagination?: Pagination
|
|
226
240
|
}
|
|
227
241
|
|
|
242
|
+
export type VMRestore = {
|
|
243
|
+
name?: string
|
|
244
|
+
description?: string
|
|
245
|
+
complete?: boolean
|
|
246
|
+
createdAt?: string
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export type ListVMRestoresRequest = {
|
|
250
|
+
pageSize?: number
|
|
251
|
+
page?: number
|
|
252
|
+
cluster?: string
|
|
253
|
+
namespace?: string
|
|
254
|
+
name?: string
|
|
255
|
+
snapshotName?: string
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type ListVMRestoresResponse = {
|
|
259
|
+
items?: VMRestore[]
|
|
260
|
+
}
|
|
261
|
+
|
|
228
262
|
export type CreateCustomResourceRequest = {
|
|
229
263
|
cluster?: string
|
|
230
264
|
data?: string[]
|
|
@@ -249,6 +283,8 @@ export type RestoreVMSnapshotRequest = {
|
|
|
249
283
|
namespace?: string
|
|
250
284
|
name?: string
|
|
251
285
|
snapshotName?: string
|
|
286
|
+
restoreName?: string
|
|
287
|
+
restoreDescription?: string
|
|
252
288
|
}
|
|
253
289
|
|
|
254
290
|
export type RestoreVMSnapshotResponse = {
|
|
@@ -264,6 +300,16 @@ export type DeleteVMSnapshotRequest = {
|
|
|
264
300
|
export type DeleteVMSnapshotResponse = {
|
|
265
301
|
}
|
|
266
302
|
|
|
303
|
+
export type DeleteVMRestoreRequest = {
|
|
304
|
+
cluster?: string
|
|
305
|
+
namespace?: string
|
|
306
|
+
name?: string
|
|
307
|
+
restoreName?: string
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export type DeleteVMRestoreResponse = {
|
|
311
|
+
}
|
|
312
|
+
|
|
267
313
|
export type UpdateVMSnapshotRequest = {
|
|
268
314
|
cluster?: string
|
|
269
315
|
namespace?: string
|
|
@@ -280,7 +326,7 @@ export type CloneVMRequest = {
|
|
|
280
326
|
namespace?: string
|
|
281
327
|
name?: string
|
|
282
328
|
cloneName?: string
|
|
283
|
-
|
|
329
|
+
aliasName?: string
|
|
284
330
|
}
|
|
285
331
|
|
|
286
332
|
export type CloneVMResponse = {
|
|
@@ -304,6 +350,68 @@ export type SystemImageVersion = {
|
|
|
304
350
|
url?: string
|
|
305
351
|
}
|
|
306
352
|
|
|
353
|
+
export type DiskVolume = {
|
|
354
|
+
storageClass?: string
|
|
355
|
+
storage?: string
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export type AddDiskVolumeToVMRequest = {
|
|
359
|
+
cluster?: string
|
|
360
|
+
namespace?: string
|
|
361
|
+
name?: string
|
|
362
|
+
diskVolumes?: DiskVolume
|
|
363
|
+
hotplug?: boolean
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export type AddDiskVolumeToVMResponse = {
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export type RemoveVMDiskVolumeRequest = {
|
|
370
|
+
cluster?: string
|
|
371
|
+
namespace?: string
|
|
372
|
+
name?: string
|
|
373
|
+
diskName?: string
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export type RemoveVMDiskVolumeResponse = {
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export type ExpandVMDiskCapacityRequest = {
|
|
380
|
+
cluster?: string
|
|
381
|
+
namespace?: string
|
|
382
|
+
name?: string
|
|
383
|
+
diskName?: string
|
|
384
|
+
capacity?: string
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export type ExpandVMDiskCapacityResponse = {
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export type CreateMultiStorageVMRequest = {
|
|
391
|
+
cluster?: string
|
|
392
|
+
namespace?: string
|
|
393
|
+
name?: string
|
|
394
|
+
aliasName?: string
|
|
395
|
+
labels?: {[key: string]: string}
|
|
396
|
+
annotations?: {[key: string]: string}
|
|
397
|
+
imageSource?: ImageSource
|
|
398
|
+
imageUrl?: string
|
|
399
|
+
disks?: VMDisks
|
|
400
|
+
cpu?: Item
|
|
401
|
+
memory?: Item
|
|
402
|
+
ssh?: SSH
|
|
403
|
+
osFamily?: OSFamily
|
|
404
|
+
osVersion?: string
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export type VMDisks = {
|
|
408
|
+
systemVolume?: DiskVolume
|
|
409
|
+
dataVolumes?: DiskVolume[]
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export type CreateMultiStorageVMVMResponse = {
|
|
413
|
+
}
|
|
414
|
+
|
|
307
415
|
export class VM {
|
|
308
416
|
static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
|
|
309
417
|
return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
@@ -311,6 +419,9 @@ export class VM {
|
|
|
311
419
|
static CreateVM(req: CreateVMRequest, initReq?: fm.InitReq): Promise<CreateVMResponse> {
|
|
312
420
|
return fm.fetchReq<CreateVMRequest, CreateVMResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vm`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
313
421
|
}
|
|
422
|
+
static CreateMultiStorageVM(req: CreateMultiStorageVMRequest, initReq?: fm.InitReq): Promise<CreateMultiStorageVMVMResponse> {
|
|
423
|
+
return fm.fetchReq<CreateMultiStorageVMRequest, CreateMultiStorageVMVMResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/multi-storage-vm`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
424
|
+
}
|
|
314
425
|
static CreateCustomResource(req: CreateCustomResourceRequest, initReq?: fm.InitReq): Promise<CreateCustomResourceResponse> {
|
|
315
426
|
return fm.fetchReq<CreateCustomResourceRequest, CreateCustomResourceResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/custom-resource`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
316
427
|
}
|
|
@@ -335,6 +446,9 @@ export class VM {
|
|
|
335
446
|
static ListVMSnapshots(req: ListVMSnapshotsRequest, initReq?: fm.InitReq): Promise<ListVMSnapshotsResponse> {
|
|
336
447
|
return fm.fetchReq<ListVMSnapshotsRequest, ListVMSnapshotsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/snapshots?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
337
448
|
}
|
|
449
|
+
static ListVMRestores(req: ListVMRestoresRequest, initReq?: fm.InitReq): Promise<ListVMRestoresResponse> {
|
|
450
|
+
return fm.fetchReq<ListVMRestoresRequest, ListVMRestoresResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/snapshots/${req["snapshotName"]}/restores?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "snapshotName"])}`, {...initReq, method: "GET"})
|
|
451
|
+
}
|
|
338
452
|
static CreateVMSnapshot(req: CreateVMSnapshotRequest, initReq?: fm.InitReq): Promise<CreateVMSnapshotResponse> {
|
|
339
453
|
return fm.fetchReq<CreateVMSnapshotRequest, CreateVMSnapshotResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/snapshot`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
340
454
|
}
|
|
@@ -344,6 +458,9 @@ export class VM {
|
|
|
344
458
|
static DeleteVMSnapshot(req: DeleteVMSnapshotRequest, initReq?: fm.InitReq): Promise<DeleteVMSnapshotResponse> {
|
|
345
459
|
return fm.fetchReq<DeleteVMSnapshotRequest, DeleteVMSnapshotResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/snapshots/${req["snapshotName"]}`, {...initReq, method: "DELETE"})
|
|
346
460
|
}
|
|
461
|
+
static DeleteVMRestore(req: DeleteVMRestoreRequest, initReq?: fm.InitReq): Promise<DeleteVMRestoreResponse> {
|
|
462
|
+
return fm.fetchReq<DeleteVMRestoreRequest, DeleteVMRestoreResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/restores/${req["restoreName"]}`, {...initReq, method: "DELETE"})
|
|
463
|
+
}
|
|
347
464
|
static UpdateVMSnapshot(req: UpdateVMSnapshotRequest, initReq?: fm.InitReq): Promise<UpdateVMSnapshotResponse> {
|
|
348
465
|
return fm.fetchReq<UpdateVMSnapshotRequest, UpdateVMSnapshotResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/snapshots/${req["snapshotName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
349
466
|
}
|
|
@@ -353,4 +470,13 @@ export class VM {
|
|
|
353
470
|
static ListSystemImages(req: ListSystemImagesRequest, initReq?: fm.InitReq): Promise<ListSystemImagesResponse> {
|
|
354
471
|
return fm.fetchReq<ListSystemImagesRequest, ListSystemImagesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/system-images?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
355
472
|
}
|
|
473
|
+
static AddDiskVolumeToVM(req: AddDiskVolumeToVMRequest, initReq?: fm.InitReq): Promise<AddDiskVolumeToVMResponse> {
|
|
474
|
+
return fm.fetchReq<AddDiskVolumeToVMRequest, AddDiskVolumeToVMResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/disk-volume`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
475
|
+
}
|
|
476
|
+
static RemoveVMDiskVolume(req: RemoveVMDiskVolumeRequest, initReq?: fm.InitReq): Promise<RemoveVMDiskVolumeResponse> {
|
|
477
|
+
return fm.fetchReq<RemoveVMDiskVolumeRequest, RemoveVMDiskVolumeResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/disk-volume/${req["diskName"]}`, {...initReq, method: "DELETE"})
|
|
478
|
+
}
|
|
479
|
+
static ExpandVMDiskCapacity(req: ExpandVMDiskCapacityRequest, initReq?: fm.InitReq): Promise<ExpandVMDiskCapacityResponse> {
|
|
480
|
+
return fm.fetchReq<ExpandVMDiskCapacityRequest, ExpandVMDiskCapacityResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/disk-volume/${req["diskName"]}/expand-capacity`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
481
|
+
}
|
|
356
482
|
}
|