@daocloud-proto/zestu 0.4.1 → 0.5.0-dev-e8aa25df

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/zestu",
3
- "version":"v0.4.1",
3
+ "version":"v0.5.0-dev-e8aa25df",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -89,12 +89,18 @@ export type ContainerInstance = {
89
89
  charge?: ChargeInfo
90
90
  hardware?: Hardware
91
91
  volumeSpec?: VolumeSpec[]
92
- image?: string
92
+ image?: Image
93
93
  instanceSpec?: InstanceSpec
94
94
  regionId?: string
95
95
  networks?: ContainerInstanceNetwork[]
96
- ssh?: SSHInfo
97
96
  saveImage?: SaveImage
97
+ ssh?: SSHInfo
98
+ schedule?: Schedule
99
+ serviceEnable?: ServiceEnable
100
+ }
101
+
102
+ export type Schedule = {
103
+ shutdownTime?: string
98
104
  }
99
105
 
100
106
  export type SaveImage = {
@@ -123,6 +129,7 @@ export type CreateContainerInstanceRequest = {
123
129
  packageSource?: PackageSource
124
130
  volumeSpec?: VolumeSpec[]
125
131
  sshKeyLoginEnable?: boolean
132
+ schedule?: Schedule
126
133
  }
127
134
 
128
135
  export type Image = {
@@ -150,6 +157,7 @@ export type ChargeInfo = {
150
157
  export type InstanceSpec = {
151
158
  instanceType?: InstanceType
152
159
  skuId?: string
160
+ specName?: string
153
161
  }
154
162
 
155
163
  export type VolumeSpec = {
@@ -224,6 +232,7 @@ export type UpdateContainerInstanceRequest = {
224
232
  instanceId?: string
225
233
  regionId?: string
226
234
  image?: Image
235
+ schedule?: Schedule
227
236
  }
228
237
 
229
238
  export type UpdateContainerInstanceResponse = {
@@ -61,6 +61,7 @@ export type ListDirectoriesAndFilesResponse = {
61
61
 
62
62
  export type GetStorageDetailsRequest = {
63
63
  regionId?: string
64
+ excludeCurrentUsage?: boolean
64
65
  }
65
66
 
66
67
  export type GetStorageDetailsResponse = {
@@ -133,21 +133,6 @@ export type RegisterResourceResponse = {
133
133
  message?: string
134
134
  }
135
135
 
136
- export type ReportResourceRequest = {
137
- clusterName?: string
138
- nodeName?: string
139
- deviceVendor?: string
140
- deviceModel?: string
141
- gpuType?: string
142
- cpuVendor?: string
143
- quantity?: {[key: string]: RegisterResourceQuantity}
144
- vgpuDevices?: NvidiaDevices[]
145
- action?: RegisterAction
146
- }
147
-
148
- export type ReportResourceResponse = {
149
- }
150
-
151
136
  export type GetNodeResourceRequest = {
152
137
  nodeName?: string
153
138
  clusterName?: string
@@ -171,4 +156,43 @@ export type GetNodeResourceResponse = {
171
156
  export type DeleteNodeResourceRequest = {
172
157
  nodeName?: string
173
158
  clusterName?: string
159
+ }
160
+
161
+ export type UpdateInventoryRequestresource = {
162
+ specFieldKey?: string
163
+ specFieldValue?: string
164
+ total?: number
165
+ free?: number
166
+ serial?: string
167
+ }
168
+
169
+ export type UpdateInventoryRequest = {
170
+ clusterName?: string
171
+ nodeName?: string
172
+ resources?: UpdateInventoryRequestresource[]
173
+ }
174
+
175
+ export type UpdateInventoryResponse = {
176
+ }
177
+
178
+ export type ListInventoriesRequest = {
179
+ clusterName?: string
180
+ nodeName?: string
181
+ }
182
+
183
+ export type ListInventoriesResponseresource = {
184
+ specFieldKey?: string
185
+ specFieldValue?: string
186
+ total?: number
187
+ free?: number
188
+ serial?: string
189
+ }
190
+
191
+ export type ListInventoriesResponse = {
192
+ resources?: ListInventoriesResponseresource[]
193
+ }
194
+
195
+ export type DeleteInventoryRequest = {
196
+ clusterName?: string
197
+ nodeName?: string
174
198
  }
@@ -0,0 +1,17 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ export enum NotifyType {
8
+ ContainerDeleteWarning = "ContainerDeleteWarning",
9
+ ContainerDeleted = "ContainerDeleted",
10
+ }
11
+
12
+ export type SendShortMessageRequest = {
13
+ cluster?: string
14
+ userName?: string
15
+ notifyType?: NotifyType
16
+ templateVars?: {[key: string]: string}
17
+ }
@@ -0,0 +1,12 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+ export type GetUserInfoRequest = {
7
+ }
8
+
9
+ export type GetUserInfoResponse = {
10
+ balance?: string
11
+ isVerified?: boolean
12
+ }
@@ -13,6 +13,8 @@ import * as ZestuIoApiMeteringV1alpha1Metering from "../metering/v1alpha1/meteri
13
13
  import * as ZestuIoApiMetricsV1alpha1Metrics from "../metrics/v1alpha1/metrics.pb"
14
14
  import * as ZestuIoApiRegionV1alpha1Region from "../region/v1alpha1/region.pb"
15
15
  import * as ZestuIoApiResourcesV1alpha1Resources from "../resources/v1alpha1/resources.pb"
16
+ import * as ZestuIoApiSmsV1alpha1Sms from "../sms/v1alpha1/sms.pb"
17
+ import * as ZestuIoApiUserV1alpha1User from "../user/v1alpha1/user.pb"
16
18
  export class ContainerInstance {
17
19
  static ListContainerInstances(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse> {
18
20
  return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
@@ -109,18 +111,32 @@ export class Agent {
109
111
  static RegisterResource(req: ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse> {
110
112
  return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse>(`/zestu.io.api.v1alpha1.Agent/RegisterResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
111
113
  }
112
- static ReportResource(req: ZestuIoApiResourcesV1alpha1Resources.ReportResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ReportResourceResponse> {
113
- return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ReportResourceRequest, ZestuIoApiResourcesV1alpha1Resources.ReportResourceResponse>(`/zestu.io.api.v1alpha1.Agent/ReportResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
114
- }
115
114
  static GetNodeResource(req: ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceResponse> {
116
115
  return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceRequest, ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceResponse>(`/zestu.io.api.v1alpha1.Agent/GetNodeResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
117
116
  }
118
117
  static DeleteNodeResource(req: ZestuIoApiResourcesV1alpha1Resources.DeleteNodeResourceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
119
118
  return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.DeleteNodeResourceRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/DeleteNodeResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
120
119
  }
120
+ static UpdateInventory(req: ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryResponse> {
121
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryRequest, ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryResponse>(`/zestu.io.api.v1alpha1.Agent/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req)})
122
+ }
123
+ static ListInventories(req: ZestuIoApiResourcesV1alpha1Resources.ListInventoriesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListInventoriesResponse> {
124
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListInventoriesRequest, ZestuIoApiResourcesV1alpha1Resources.ListInventoriesResponse>(`/zestu.io.api.v1alpha1.Agent/ListInventories`, {...initReq, method: "POST", body: JSON.stringify(req)})
125
+ }
126
+ static DeleteInventory(req: ZestuIoApiResourcesV1alpha1Resources.DeleteInventoryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
127
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.DeleteInventoryRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/DeleteInventory`, {...initReq, method: "POST", body: JSON.stringify(req)})
128
+ }
129
+ static SendShortMessage(req: ZestuIoApiSmsV1alpha1Sms.SendShortMessageRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
130
+ return fm.fetchReq<ZestuIoApiSmsV1alpha1Sms.SendShortMessageRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/SendShortMessage`, {...initReq, method: "POST", body: JSON.stringify(req)})
131
+ }
121
132
  }
122
133
  export class Metrics {
123
134
  static QueryMetricsRange(req: ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeRequest, initReq?: fm.InitReq): Promise<ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeResponse> {
124
135
  return fm.fetchReq<ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeRequest, ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/metricsrange`, {...initReq, method: "POST", body: JSON.stringify(req)})
125
136
  }
137
+ }
138
+ export class User {
139
+ static GetUserInfo(req: ZestuIoApiUserV1alpha1User.GetUserInfoRequest, initReq?: fm.InitReq): Promise<ZestuIoApiUserV1alpha1User.GetUserInfoResponse> {
140
+ return fm.fetchReq<ZestuIoApiUserV1alpha1User.GetUserInfoRequest, ZestuIoApiUserV1alpha1User.GetUserInfoResponse>(`/apis/zestu.io/v1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
141
+ }
126
142
  }