@daocloud-proto/virtnest 0.15.0 → 0.16.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/v1alpha1/vm.pb.ts +23 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/virtnest",
3
- "version":"0.15.0",
3
+ "version":"0.16.0-dev1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
package/v1alpha1/vm.pb.ts CHANGED
@@ -60,6 +60,7 @@ export enum VMStatus {
60
60
  processing = "processing",
61
61
  error = "error",
62
62
  poweroff = "poweroff",
63
+ migrating = "migrating",
63
64
  }
64
65
 
65
66
  export enum StorageStatus {
@@ -106,6 +107,12 @@ export enum NodePhase {
106
107
  PhaseUnknown = "PhaseUnknown",
107
108
  }
108
109
 
110
+ export enum MigrationStatus {
111
+ Success = "Success",
112
+ Failed = "Failed",
113
+ Processing = "Processing",
114
+ }
115
+
109
116
  export type Pagination = {
110
117
  page?: number
111
118
  pageSize?: number
@@ -544,6 +551,7 @@ export type LiveMigrateVMRequest = {
544
551
  }
545
552
 
546
553
  export type LiveMigrateVMResponse = {
554
+ migrationName?: string
547
555
  }
548
556
 
549
557
  export type ListClusterStorageClassesRequest = {
@@ -704,6 +712,18 @@ export type GetVMNetworkCountResponse = {
704
712
  ipModel?: number
705
713
  }
706
714
 
715
+ export type LiveMigrateStatusRequest = {
716
+ cluster?: string
717
+ namespace?: string
718
+ name?: string
719
+ migrationName?: string
720
+ }
721
+
722
+ export type LiveMigrateStatusResponse = {
723
+ status?: MigrationStatus
724
+ failureReason?: string
725
+ }
726
+
707
727
  export class VM {
708
728
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
709
729
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -765,6 +785,9 @@ export class VM {
765
785
  static LiveMigrateVM(req: LiveMigrateVMRequest, initReq?: fm.InitReq): Promise<LiveMigrateVMResponse> {
766
786
  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)})
767
787
  }
788
+ static LiveMigrateStatus(req: LiveMigrateStatusRequest, initReq?: fm.InitReq): Promise<LiveMigrateStatusResponse> {
789
+ return fm.fetchReq<LiveMigrateStatusRequest, LiveMigrateStatusResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/live-migration/${req["migrationName"]}/status?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "migrationName"])}`, {...initReq, method: "GET"})
790
+ }
768
791
  static ListSystemImages(req: ListSystemImagesRequest, initReq?: fm.InitReq): Promise<ListSystemImagesResponse> {
769
792
  return fm.fetchReq<ListSystemImagesRequest, ListSystemImagesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/system-images?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
770
793
  }