@daocloud-proto/virtnest 0.2.0-dev3 → 0.2.0-dev5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/v1alpha1/vm.pb.ts +21 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/virtnest",
3
- "version":"0.2.0-dev3",
3
+ "version":"0.2.0-dev5",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
package/v1alpha1/vm.pb.ts CHANGED
@@ -16,6 +16,7 @@ export enum OSFamily {
16
16
  export enum AllowedOperation {
17
17
  allowed_operation_snapshot = "allowed_operation_snapshot",
18
18
  allowed_operation_clone = "allowed_operation_clone",
19
+ allowed_operation_live_migration = "allowed_operation_live_migration",
19
20
  }
20
21
 
21
22
  export enum ImageSource {
@@ -184,6 +185,11 @@ export type GetVMResponse = {
184
185
  sshKey?: string
185
186
  cpu?: Item
186
187
  memory?: Item
188
+ vmErrorMessage?: VmErrorMessage
189
+ imageSource?: ImageSource
190
+ osFamily?: OSFamily
191
+ osVersion?: string
192
+ imageUrl?: string
187
193
  }
188
194
 
189
195
  export type VMNetwork = {
@@ -208,6 +214,7 @@ export type VMStorage = {
208
214
  capacity?: string
209
215
  status?: StorageStatus
210
216
  storageClass?: string
217
+ allowExpand?: boolean
211
218
  }
212
219
 
213
220
  export type ListVMStoragesRequest = {
@@ -390,6 +397,7 @@ export type AddDiskVolumeToVMRequest = {
390
397
  }
391
398
 
392
399
  export type AddDiskVolumeToVMResponse = {
400
+ needRestart?: boolean
393
401
  }
394
402
 
395
403
  export type RemoveVMDiskVolumeRequest = {
@@ -411,6 +419,7 @@ export type ExpandVMDiskCapacityRequest = {
411
419
  }
412
420
 
413
421
  export type ExpandVMDiskCapacityResponse = {
422
+ needRestart?: boolean
414
423
  }
415
424
 
416
425
  export type VMDisks = {
@@ -418,6 +427,15 @@ export type VMDisks = {
418
427
  dataVolumes?: DiskVolume[]
419
428
  }
420
429
 
430
+ export type LiveMigrateVMRequest = {
431
+ cluster?: string
432
+ namespace?: string
433
+ name?: string
434
+ }
435
+
436
+ export type LiveMigrateVMResponse = {
437
+ }
438
+
421
439
  export class VM {
422
440
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
423
441
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -476,6 +494,9 @@ export class VM {
476
494
  static CloneVM(req: CloneVMRequest, initReq?: fm.InitReq): Promise<CloneVMResponse> {
477
495
  return fm.fetchReq<CloneVMRequest, CloneVMResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/clone`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
478
496
  }
497
+ static LiveMigrateVM(req: LiveMigrateVMRequest, initReq?: fm.InitReq): Promise<LiveMigrateVMResponse> {
498
+ return fm.fetchReq<LiveMigrateVMRequest, LiveMigrateVMResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/live-migration`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
499
+ }
479
500
  static ListSystemImages(req: ListSystemImagesRequest, initReq?: fm.InitReq): Promise<ListSystemImagesResponse> {
480
501
  return fm.fetchReq<ListSystemImagesRequest, ListSystemImagesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/system-images?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
481
502
  }