@daocloud-proto/virtnest 0.14.0-dev2 → 0.14.0-dev3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/virtnest",
3
- "version":"0.14.0-dev2",
3
+ "version":"0.14.0-dev3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -14,6 +14,9 @@ export enum Status {
14
14
  export enum GPUType {
15
15
  Nvidia_GPU = "Nvidia_GPU",
16
16
  Nvidia_vGPU = "Nvidia_vGPU",
17
+ Metax_GPU = "Metax_GPU",
18
+ Unknown_GPU = "Unknown_GPU",
19
+ Unknown_vGPU = "Unknown_vGPU",
17
20
  }
18
21
 
19
22
  export type ClusterInfo = {
package/v1alpha1/vm.pb.ts CHANGED
@@ -38,6 +38,9 @@ export enum ImageSource {
38
38
  export enum GPUType {
39
39
  Nvidia_GPU = "Nvidia_GPU",
40
40
  Nvidia_vGPU = "Nvidia_vGPU",
41
+ Metax_GPU = "Metax_GPU",
42
+ Unknown_GPU = "Unknown_GPU",
43
+ Unknown_vGPU = "Unknown_vGPU",
41
44
  }
42
45
 
43
46
  export enum DiskOperation {
@@ -345,6 +348,7 @@ export type VMSnapshot = {
345
348
  createdAt?: string
346
349
  status?: SnapshotStatus
347
350
  restoreTime?: string
351
+ vmName?: string
348
352
  }
349
353
 
350
354
  export type ListVMSnapshotsResponse = {
@@ -571,6 +575,7 @@ export type CreateVMWithVMTemplateRequest = {
571
575
  secret?: string
572
576
  network?: MultusNetwork
573
577
  createPowerOn?: boolean
578
+ gpus?: GPU[]
574
579
  }
575
580
 
576
581
  export type CreateVMWithVMTemplateResponse = {
@@ -650,6 +655,54 @@ export type ColdMigrationRequest = {
650
655
  export type ColdMigrationResponse = {
651
656
  }
652
657
 
658
+ export type ListClusterSnapshotsRequest = {
659
+ pageSize?: number
660
+ page?: number
661
+ cluster?: string
662
+ search?: string
663
+ sortBy?: SortBy
664
+ sortDir?: SortDir
665
+ namespace?: string
666
+ }
667
+
668
+ export type ListClusterSnapshotsResponse = {
669
+ items?: VMSnapshot[]
670
+ pagination?: Pagination
671
+ }
672
+
673
+ export type GetVMStatusCountRequest = {
674
+ cluster?: string
675
+ namespace?: string
676
+ }
677
+
678
+ export type GetVMStatusCountResponse = {
679
+ running?: number
680
+ error?: number
681
+ processing?: number
682
+ poweroff?: number
683
+ total?: number
684
+ }
685
+
686
+ export type GetVMDiskCountRequest = {
687
+ cluster?: string
688
+ namespace?: string
689
+ }
690
+
691
+ export type GetVMDiskCountResponse = {
692
+ system?: number
693
+ data?: number
694
+ }
695
+
696
+ export type GetVMNetworkCountRequest = {
697
+ cluster?: string
698
+ namespace?: string
699
+ }
700
+
701
+ export type GetVMNetworkCountResponse = {
702
+ ipPool?: number
703
+ ipModel?: number
704
+ }
705
+
653
706
  export class VM {
654
707
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
655
708
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -741,4 +794,16 @@ export class VM {
741
794
  static ColdMigration(req: ColdMigrationRequest, initReq?: fm.InitReq): Promise<ColdMigrationResponse> {
742
795
  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)})
743
796
  }
797
+ static ListClusterSnapshots(req: ListClusterSnapshotsRequest, initReq?: fm.InitReq): Promise<ListClusterSnapshotsResponse> {
798
+ return fm.fetchReq<ListClusterSnapshotsRequest, ListClusterSnapshotsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/snapshots?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
799
+ }
800
+ static GetVMStatusCount(req: GetVMStatusCountRequest, initReq?: fm.InitReq): Promise<GetVMStatusCountResponse> {
801
+ return fm.fetchReq<GetVMStatusCountRequest, GetVMStatusCountResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vm-status-count?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
802
+ }
803
+ static GetVMDiskCount(req: GetVMDiskCountRequest, initReq?: fm.InitReq): Promise<GetVMDiskCountResponse> {
804
+ return fm.fetchReq<GetVMDiskCountRequest, GetVMDiskCountResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vm-disk-count?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
805
+ }
806
+ static GetVMNetworkCount(req: GetVMNetworkCountRequest, initReq?: fm.InitReq): Promise<GetVMNetworkCountResponse> {
807
+ return fm.fetchReq<GetVMNetworkCountRequest, GetVMNetworkCountResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vm-network-count?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
808
+ }
744
809
  }
@@ -21,6 +21,9 @@ export enum PersistentVolumeAccessMode {
21
21
  export enum GPUType {
22
22
  Nvidia_GPU = "Nvidia_GPU",
23
23
  Nvidia_vGPU = "Nvidia_vGPU",
24
+ Metax_GPU = "Metax_GPU",
25
+ Unknown_GPU = "Unknown_GPU",
26
+ Unknown_vGPU = "Unknown_vGPU",
24
27
  }
25
28
 
26
29
  export enum ImageSource {
@@ -178,6 +181,14 @@ export type GetCustomResourceResponse = {
178
181
  data?: string
179
182
  }
180
183
 
184
+ export type GetVMTemplateCountRequest = {
185
+ }
186
+
187
+ export type GetVMTemplateCountResponse = {
188
+ internal?: number
189
+ custom?: number
190
+ }
191
+
181
192
  export class VMTemplate {
182
193
  static ListVMTemplates(req: ListVMTemplatesRequest, initReq?: fm.InitReq): Promise<ListVMTemplatesResponse> {
183
194
  return fm.fetchReq<ListVMTemplatesRequest, ListVMTemplatesResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -197,4 +208,7 @@ export class VMTemplate {
197
208
  static GetCustomResource(req: GetCustomResourceRequest, initReq?: fm.InitReq): Promise<GetCustomResourceResponse> {
198
209
  return fm.fetchReq<GetCustomResourceRequest, GetCustomResourceResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates/${req["name"]}/custom-resource?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
199
210
  }
211
+ static GetVMTemplateCount(req: GetVMTemplateCountRequest, initReq?: fm.InitReq): Promise<GetVMTemplateCountResponse> {
212
+ return fm.fetchReq<GetVMTemplateCountRequest, GetVMTemplateCountResponse>(`/apis/virtnest.io/v1alpha1/vm-template-count?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
213
+ }
200
214
  }