@daocloud-proto/virtnest 0.11.0-rc3 → 0.12.0-rc1

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.11.0-rc3",
3
+ "version":"0.12.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
package/v1alpha1/vm.pb.ts CHANGED
@@ -57,6 +57,7 @@ export enum VMStatus {
57
57
  processing = "processing",
58
58
  error = "error",
59
59
  poweroff = "poweroff",
60
+ migration = "migration",
60
61
  }
61
62
 
62
63
  export enum StorageStatus {
@@ -70,6 +71,11 @@ export enum StorageType {
70
71
  data = "data",
71
72
  }
72
73
 
74
+ export enum DataVolumeStatus {
75
+ wait_for_consumer = "wait_for_consumer",
76
+ succeeded = "succeeded",
77
+ }
78
+
73
79
  export enum SnapshotStatus {
74
80
  snapshot_succeeded = "snapshot_succeeded",
75
81
  snapshot_failed = "snapshot_failed",
@@ -625,6 +631,18 @@ export type Node = {
625
631
  phase?: NodePhase
626
632
  }
627
633
 
634
+ export type ColdMigrationRequest = {
635
+ cluster?: string
636
+ namespace?: string
637
+ name?: string
638
+ targetNode?: string
639
+ disks?: VMDisks
640
+ powerOn?: boolean
641
+ }
642
+
643
+ export type ColdMigrationResponse = {
644
+ }
645
+
628
646
  export class VM {
629
647
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
630
648
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -713,4 +731,7 @@ export class VM {
713
731
  static ListClusterNodes(req: ListClusterNodesRequest, initReq?: fm.InitReq): Promise<ListClusterNodesResponse> {
714
732
  return fm.fetchReq<ListClusterNodesRequest, ListClusterNodesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/nodes?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
715
733
  }
734
+ static ColdMigration(req: ColdMigrationRequest, initReq?: fm.InitReq): Promise<ColdMigrationResponse> {
735
+ return fm.fetchReq<ColdMigrationRequest, ColdMigrationResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/cold-migration`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
736
+ }
716
737
  }