@daocloud-proto/virtnest 0.14.0-rc1 → 0.14.0-rc3
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 +1 -1
- package/v1alpha1/vm.pb.ts +42 -0
- package/v1alpha1/vmtemplate.pb.ts +11 -0
package/package.json
CHANGED
package/v1alpha1/vm.pb.ts
CHANGED
|
@@ -666,6 +666,39 @@ export type ListClusterSnapshotsResponse = {
|
|
|
666
666
|
pagination?: Pagination
|
|
667
667
|
}
|
|
668
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
|
+
|
|
669
702
|
export class VM {
|
|
670
703
|
static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
|
|
671
704
|
return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
@@ -760,4 +793,13 @@ export class VM {
|
|
|
760
793
|
static ListClusterSnapshots(req: ListClusterSnapshotsRequest, initReq?: fm.InitReq): Promise<ListClusterSnapshotsResponse> {
|
|
761
794
|
return fm.fetchReq<ListClusterSnapshotsRequest, ListClusterSnapshotsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/snapshots?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
762
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
|
+
}
|
|
763
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
|
}
|