@daocloud-proto/virtnest 0.4.0-dev-1 → 0.4.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 +1 -1
- package/v1alpha1/cluster.pb.ts +34 -0
- package/v1alpha1/vm.pb.ts +47 -0
package/package.json
CHANGED
package/v1alpha1/cluster.pb.ts
CHANGED
|
@@ -15,6 +15,8 @@ export type ClusterInfo = {
|
|
|
15
15
|
name?: string
|
|
16
16
|
status?: Status
|
|
17
17
|
isKubevirtInstalled?: boolean
|
|
18
|
+
isInsightAgentInstalled?: boolean
|
|
19
|
+
isSpiderpoolInstalled?: boolean
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export type ListClustersRequest = {
|
|
@@ -33,6 +35,29 @@ export type ListClusterNamespacesResponse = {
|
|
|
33
35
|
items?: string[]
|
|
34
36
|
}
|
|
35
37
|
|
|
38
|
+
export type IsInsightAgentInstalledRequest = {
|
|
39
|
+
cluster?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type IsInsightAgentInstalledResponse = {
|
|
43
|
+
exist?: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type IsServiceMonitorAppliedRequest = {
|
|
47
|
+
cluster?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type IsServiceMonitorAppliedResponse = {
|
|
51
|
+
exist?: boolean
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type CreateServiceMonitorRequest = {
|
|
55
|
+
cluster?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type CreateServiceMonitorResponse = {
|
|
59
|
+
}
|
|
60
|
+
|
|
36
61
|
export class Cluster {
|
|
37
62
|
static ListClusters(req: ListClustersRequest, initReq?: fm.InitReq): Promise<ListClustersResponse> {
|
|
38
63
|
return fm.fetchReq<ListClustersRequest, ListClustersResponse>(`/apis/virtnest.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -40,4 +65,13 @@ export class Cluster {
|
|
|
40
65
|
static ListClusterNamespaces(req: ListClusterNamespacesRequest, initReq?: fm.InitReq): Promise<ListClusterNamespacesResponse> {
|
|
41
66
|
return fm.fetchReq<ListClusterNamespacesRequest, ListClusterNamespacesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
42
67
|
}
|
|
68
|
+
static IsInsightAgentInstalled(req: IsInsightAgentInstalledRequest, initReq?: fm.InitReq): Promise<IsInsightAgentInstalledResponse> {
|
|
69
|
+
return fm.fetchReq<IsInsightAgentInstalledRequest, IsInsightAgentInstalledResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/insight-agent/exist?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
70
|
+
}
|
|
71
|
+
static IsServiceMonitorApplied(req: IsServiceMonitorAppliedRequest, initReq?: fm.InitReq): Promise<IsServiceMonitorAppliedResponse> {
|
|
72
|
+
return fm.fetchReq<IsServiceMonitorAppliedRequest, IsServiceMonitorAppliedResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/service-monitor/exist?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
73
|
+
}
|
|
74
|
+
static CreateServiceMonitor(req: CreateServiceMonitorRequest, initReq?: fm.InitReq): Promise<CreateServiceMonitorResponse> {
|
|
75
|
+
return fm.fetchReq<CreateServiceMonitorRequest, CreateServiceMonitorResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/service-monitor`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
76
|
+
}
|
|
43
77
|
}
|
package/v1alpha1/vm.pb.ts
CHANGED
|
@@ -120,6 +120,17 @@ export type ListClusterVmsResponse = {
|
|
|
120
120
|
pagination?: Pagination
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
export type MultusNetwork = {
|
|
124
|
+
networkMode?: string
|
|
125
|
+
items?: MultusNetworkItem[]
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type MultusNetworkItem = {
|
|
129
|
+
interface?: string
|
|
130
|
+
multusConfig?: MultusConfigInfo
|
|
131
|
+
ipPoolNames?: string[]
|
|
132
|
+
}
|
|
133
|
+
|
|
123
134
|
export type CreateVMRequest = {
|
|
124
135
|
cluster?: string
|
|
125
136
|
namespace?: string
|
|
@@ -136,6 +147,7 @@ export type CreateVMRequest = {
|
|
|
136
147
|
osFamily?: string
|
|
137
148
|
osVersion?: string
|
|
138
149
|
secret?: string
|
|
150
|
+
networks?: MultusNetwork[]
|
|
139
151
|
}
|
|
140
152
|
|
|
141
153
|
export type SSH = {
|
|
@@ -217,6 +229,18 @@ export type GetVMResponse = {
|
|
|
217
229
|
node?: string
|
|
218
230
|
allowedOperation?: AllowedOperation[]
|
|
219
231
|
secret?: string
|
|
232
|
+
networks?: MultusNetworkInfo[]
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export type MultusNetworkInfo = {
|
|
236
|
+
networkMode?: string
|
|
237
|
+
multusConfig?: MultusConfigInfo
|
|
238
|
+
interface?: string
|
|
239
|
+
ip?: string
|
|
240
|
+
mac?: string
|
|
241
|
+
subnet?: string
|
|
242
|
+
gateway?: string
|
|
243
|
+
vlanId?: string
|
|
220
244
|
}
|
|
221
245
|
|
|
222
246
|
export type VMNetwork = {
|
|
@@ -502,6 +526,26 @@ export type CreateVMWithVMTemplateRequest = {
|
|
|
502
526
|
export type CreateVMWithVMTemplateResponse = {
|
|
503
527
|
}
|
|
504
528
|
|
|
529
|
+
export type MultusConfigInfo = {
|
|
530
|
+
name?: string
|
|
531
|
+
namespace?: string
|
|
532
|
+
cniType?: string
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export type NetworkInterfaceInfo = {
|
|
536
|
+
networkInterface?: string
|
|
537
|
+
multusConfigs?: MultusConfigInfo[]
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export type ListNetworkInterfacesRequest = {
|
|
541
|
+
cluster?: string
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export type ListNetworkInterfacesResponse = {
|
|
545
|
+
ipPools?: string[]
|
|
546
|
+
interfaces?: NetworkInterfaceInfo[]
|
|
547
|
+
}
|
|
548
|
+
|
|
505
549
|
export class VM {
|
|
506
550
|
static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
|
|
507
551
|
return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
@@ -581,4 +625,7 @@ export class VM {
|
|
|
581
625
|
static CreateVMWithVMTemplate(req: CreateVMWithVMTemplateRequest, initReq?: fm.InitReq): Promise<CreateVMWithVMTemplateResponse> {
|
|
582
626
|
return fm.fetchReq<CreateVMWithVMTemplateRequest, CreateVMWithVMTemplateResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vm-with-vmtemplate/${req["vmtemplateName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
583
627
|
}
|
|
628
|
+
static ListNetworkInterfaces(req: ListNetworkInterfacesRequest, initReq?: fm.InitReq): Promise<ListNetworkInterfacesResponse> {
|
|
629
|
+
return fm.fetchReq<ListNetworkInterfacesRequest, ListNetworkInterfacesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/network-interfaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
630
|
+
}
|
|
584
631
|
}
|