@daocloud-proto/virtnest 0.4.0 → 0.5.0-dev1

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.4.0",
3
+ "version":"0.5.0-dev1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -35,27 +35,12 @@ export type ListClusterNamespacesResponse = {
35
35
  items?: string[]
36
36
  }
37
37
 
38
- export type IsInsightAgentInstalledRequest = {
38
+ export type IsVMMonitorReadyRequest = {
39
39
  cluster?: string
40
40
  }
41
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 = {
42
+ export type IsVMMonitorReadyResponse = {
43
+ ready?: boolean
59
44
  }
60
45
 
61
46
  export class Cluster {
@@ -65,13 +50,7 @@ export class Cluster {
65
50
  static ListClusterNamespaces(req: ListClusterNamespacesRequest, initReq?: fm.InitReq): Promise<ListClusterNamespacesResponse> {
66
51
  return fm.fetchReq<ListClusterNamespacesRequest, ListClusterNamespacesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
67
52
  }
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)})
53
+ static IsVMMonitorReady(req: IsVMMonitorReadyRequest, initReq?: fm.InitReq): Promise<IsVMMonitorReadyResponse> {
54
+ return fm.fetchReq<IsVMMonitorReadyRequest, IsVMMonitorReadyResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vm-monitor/ready?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
76
55
  }
77
56
  }
package/v1alpha1/vm.pb.ts CHANGED
@@ -147,7 +147,7 @@ export type CreateVMRequest = {
147
147
  osFamily?: string
148
148
  osVersion?: string
149
149
  secret?: string
150
- networks?: MultusNetwork[]
150
+ network?: MultusNetwork
151
151
  }
152
152
 
153
153
  export type SSH = {
@@ -229,11 +229,10 @@ export type GetVMResponse = {
229
229
  node?: string
230
230
  allowedOperation?: AllowedOperation[]
231
231
  secret?: string
232
- networks?: MultusNetworkInfo[]
232
+ network?: MultusNetworkInfo
233
233
  }
234
234
 
235
- export type MultusNetworkInfo = {
236
- networkMode?: string
235
+ export type MultusNetworkInfoItem = {
237
236
  multusConfig?: MultusConfigInfo
238
237
  interface?: string
239
238
  ip?: string
@@ -243,6 +242,11 @@ export type MultusNetworkInfo = {
243
242
  vlanId?: string
244
243
  }
245
244
 
245
+ export type MultusNetworkInfo = {
246
+ networkMode?: string
247
+ items?: MultusNetworkInfoItem[]
248
+ }
249
+
246
250
  export type VMNetwork = {
247
251
  name?: string
248
252
  type?: string