@daocloud-proto/zestu 0.4.0-dev-110b3d5b → 0.4.0-dev-5081bcdb

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.0-dev-110b3d5b",
3
+ "version":"v0.4.0-dev-5081bcdb",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
  }
@@ -109,15 +109,21 @@ export class Agent {
109
109
  static RegisterResource(req: ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse> {
110
110
  return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse>(`/zestu.io.api.v1alpha1.Agent/RegisterResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
111
111
  }
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
112
  static GetNodeResource(req: ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceResponse> {
116
113
  return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceRequest, ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceResponse>(`/zestu.io.api.v1alpha1.Agent/GetNodeResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
117
114
  }
118
115
  static DeleteNodeResource(req: ZestuIoApiResourcesV1alpha1Resources.DeleteNodeResourceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
119
116
  return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.DeleteNodeResourceRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/DeleteNodeResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
120
117
  }
118
+ static UpdateInventory(req: ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryResponse> {
119
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryRequest, ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryResponse>(`/zestu.io.api.v1alpha1.Agent/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req)})
120
+ }
121
+ static ListInventories(req: ZestuIoApiResourcesV1alpha1Resources.ListInventoriesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListInventoriesResponse> {
122
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListInventoriesRequest, ZestuIoApiResourcesV1alpha1Resources.ListInventoriesResponse>(`/zestu.io.api.v1alpha1.Agent/ListInventories`, {...initReq, method: "POST", body: JSON.stringify(req)})
123
+ }
124
+ static DeleteInventory(req: ZestuIoApiResourcesV1alpha1Resources.DeleteInventoryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
125
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.DeleteInventoryRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/DeleteInventory`, {...initReq, method: "POST", body: JSON.stringify(req)})
126
+ }
121
127
  }
122
128
  export class Metrics {
123
129
  static QueryMetricsRange(req: ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeRequest, initReq?: fm.InitReq): Promise<ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeResponse> {