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

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-rc2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
package/v1alpha1/vm.pb.ts CHANGED
@@ -345,6 +345,7 @@ export type VMSnapshot = {
345
345
  createdAt?: string
346
346
  status?: SnapshotStatus
347
347
  restoreTime?: string
348
+ vmName?: string
348
349
  }
349
350
 
350
351
  export type ListVMSnapshotsResponse = {
@@ -650,6 +651,54 @@ export type ColdMigrationRequest = {
650
651
  export type ColdMigrationResponse = {
651
652
  }
652
653
 
654
+ export type ListClusterSnapshotsRequest = {
655
+ pageSize?: number
656
+ page?: number
657
+ cluster?: string
658
+ search?: string
659
+ sortBy?: SortBy
660
+ sortDir?: SortDir
661
+ namespace?: string
662
+ }
663
+
664
+ export type ListClusterSnapshotsResponse = {
665
+ items?: VMSnapshot[]
666
+ pagination?: Pagination
667
+ }
668
+
669
+ export type GetVMStatusCountRequest = {
670
+ cluster?: string
671
+ namespace?: string
672
+ }
673
+
674
+ export type GetVMStatusCountResponse = {
675
+ running?: number
676
+ error?: number
677
+ processing?: number
678
+ poweroff?: number
679
+ total?: number
680
+ }
681
+
682
+ export type GetVMDiskCountRequest = {
683
+ cluster?: string
684
+ namespace?: string
685
+ }
686
+
687
+ export type GetVMDiskCountResponse = {
688
+ system?: number
689
+ data?: number
690
+ }
691
+
692
+ export type GetVMNetworkCountRequest = {
693
+ cluster?: string
694
+ namespace?: string
695
+ }
696
+
697
+ export type GetVMNetworkCountResponse = {
698
+ ipPool?: number
699
+ ipModel?: number
700
+ }
701
+
653
702
  export class VM {
654
703
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
655
704
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -741,4 +790,16 @@ export class VM {
741
790
  static ColdMigration(req: ColdMigrationRequest, initReq?: fm.InitReq): Promise<ColdMigrationResponse> {
742
791
  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
792
  }
793
+ static ListClusterSnapshots(req: ListClusterSnapshotsRequest, initReq?: fm.InitReq): Promise<ListClusterSnapshotsResponse> {
794
+ return fm.fetchReq<ListClusterSnapshotsRequest, ListClusterSnapshotsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/snapshots?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
795
+ }
796
+ static GetVMStatusCount(req: GetVMStatusCountRequest, initReq?: fm.InitReq): Promise<GetVMStatusCountResponse> {
797
+ 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"})
798
+ }
799
+ static GetVMDiskCount(req: GetVMDiskCountRequest, initReq?: fm.InitReq): Promise<GetVMDiskCountResponse> {
800
+ 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"})
801
+ }
802
+ static GetVMNetworkCount(req: GetVMNetworkCountRequest, initReq?: fm.InitReq): Promise<GetVMNetworkCountResponse> {
803
+ 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"})
804
+ }
744
805
  }
@@ -178,6 +178,14 @@ export type GetCustomResourceResponse = {
178
178
  data?: string
179
179
  }
180
180
 
181
+ export type GetVMTemplateCountRequest = {
182
+ }
183
+
184
+ export type GetVMTemplateCountResponse = {
185
+ internal?: number
186
+ custom?: number
187
+ }
188
+
181
189
  export class VMTemplate {
182
190
  static ListVMTemplates(req: ListVMTemplatesRequest, initReq?: fm.InitReq): Promise<ListVMTemplatesResponse> {
183
191
  return fm.fetchReq<ListVMTemplatesRequest, ListVMTemplatesResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -197,4 +205,7 @@ export class VMTemplate {
197
205
  static GetCustomResource(req: GetCustomResourceRequest, initReq?: fm.InitReq): Promise<GetCustomResourceResponse> {
198
206
  return fm.fetchReq<GetCustomResourceRequest, GetCustomResourceResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates/${req["name"]}/custom-resource?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
199
207
  }
208
+ static GetVMTemplateCount(req: GetVMTemplateCountRequest, initReq?: fm.InitReq): Promise<GetVMTemplateCountResponse> {
209
+ return fm.fetchReq<GetVMTemplateCountRequest, GetVMTemplateCountResponse>(`/apis/virtnest.io/v1alpha1/vm-template-count?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
210
+ }
200
211
  }