@daocloud-proto/virtnest 0.2.0-dev4 → 0.2.0-dev6

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 +20 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/virtnest",
3
- "version":"0.2.0-dev4",
3
+ "version":"0.2.0-dev6",
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 {
@@ -185,6 +186,10 @@ export type GetVMResponse = {
185
186
  cpu?: Item
186
187
  memory?: Item
187
188
  vmErrorMessage?: VmErrorMessage
189
+ imageSource?: ImageSource
190
+ osFamily?: OSFamily
191
+ osVersion?: string
192
+ imageUrl?: string
188
193
  }
189
194
 
190
195
  export type VMNetwork = {
@@ -209,6 +214,7 @@ export type VMStorage = {
209
214
  capacity?: string
210
215
  status?: StorageStatus
211
216
  storageClass?: string
217
+ allowExpand?: boolean
212
218
  }
213
219
 
214
220
  export type ListVMStoragesRequest = {
@@ -391,6 +397,7 @@ export type AddDiskVolumeToVMRequest = {
391
397
  }
392
398
 
393
399
  export type AddDiskVolumeToVMResponse = {
400
+ needRestart?: boolean
394
401
  }
395
402
 
396
403
  export type RemoveVMDiskVolumeRequest = {
@@ -412,6 +419,7 @@ export type ExpandVMDiskCapacityRequest = {
412
419
  }
413
420
 
414
421
  export type ExpandVMDiskCapacityResponse = {
422
+ needRestart?: boolean
415
423
  }
416
424
 
417
425
  export type VMDisks = {
@@ -419,6 +427,15 @@ export type VMDisks = {
419
427
  dataVolumes?: DiskVolume[]
420
428
  }
421
429
 
430
+ export type LiveMigrateVMRequest = {
431
+ cluster?: string
432
+ namespace?: string
433
+ name?: string
434
+ }
435
+
436
+ export type LiveMigrateVMResponse = {
437
+ }
438
+
422
439
  export class VM {
423
440
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
424
441
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -477,6 +494,9 @@ export class VM {
477
494
  static CloneVM(req: CloneVMRequest, initReq?: fm.InitReq): Promise<CloneVMResponse> {
478
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)})
479
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
+ }
480
500
  static ListSystemImages(req: ListSystemImagesRequest, initReq?: fm.InitReq): Promise<ListSystemImagesResponse> {
481
501
  return fm.fetchReq<ListSystemImagesRequest, ListSystemImagesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/system-images?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
482
502
  }