@daocloud-proto/zestu 0.4.0-dev-110b3d5b → 0.4.0-dev-d85a2420
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
|
@@ -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
|
}
|
|
@@ -13,6 +13,7 @@ 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 ZestuIoApiUserV1alpha1User from "../user/v1alpha1/user.pb"
|
|
16
17
|
export class ContainerInstance {
|
|
17
18
|
static ListContainerInstances(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse> {
|
|
18
19
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
@@ -109,18 +110,29 @@ export class Agent {
|
|
|
109
110
|
static RegisterResource(req: ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse> {
|
|
110
111
|
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse>(`/zestu.io.api.v1alpha1.Agent/RegisterResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
111
112
|
}
|
|
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
113
|
static GetNodeResource(req: ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceResponse> {
|
|
116
114
|
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceRequest, ZestuIoApiResourcesV1alpha1Resources.GetNodeResourceResponse>(`/zestu.io.api.v1alpha1.Agent/GetNodeResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
117
115
|
}
|
|
118
116
|
static DeleteNodeResource(req: ZestuIoApiResourcesV1alpha1Resources.DeleteNodeResourceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
119
117
|
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.DeleteNodeResourceRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/DeleteNodeResource`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
120
118
|
}
|
|
119
|
+
static UpdateInventory(req: ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryResponse> {
|
|
120
|
+
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryRequest, ZestuIoApiResourcesV1alpha1Resources.UpdateInventoryResponse>(`/zestu.io.api.v1alpha1.Agent/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
121
|
+
}
|
|
122
|
+
static ListInventories(req: ZestuIoApiResourcesV1alpha1Resources.ListInventoriesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListInventoriesResponse> {
|
|
123
|
+
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListInventoriesRequest, ZestuIoApiResourcesV1alpha1Resources.ListInventoriesResponse>(`/zestu.io.api.v1alpha1.Agent/ListInventories`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
124
|
+
}
|
|
125
|
+
static DeleteInventory(req: ZestuIoApiResourcesV1alpha1Resources.DeleteInventoryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
126
|
+
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.DeleteInventoryRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/DeleteInventory`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
127
|
+
}
|
|
121
128
|
}
|
|
122
129
|
export class Metrics {
|
|
123
130
|
static QueryMetricsRange(req: ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeRequest, initReq?: fm.InitReq): Promise<ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeResponse> {
|
|
124
131
|
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
132
|
}
|
|
133
|
+
}
|
|
134
|
+
export class User {
|
|
135
|
+
static GetUserInfo(req: ZestuIoApiUserV1alpha1User.GetUserInfoRequest, initReq?: fm.InitReq): Promise<ZestuIoApiUserV1alpha1User.GetUserInfoResponse> {
|
|
136
|
+
return fm.fetchReq<ZestuIoApiUserV1alpha1User.GetUserInfoRequest, ZestuIoApiUserV1alpha1User.GetUserInfoResponse>(`/apis/zestu.io/v1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
137
|
+
}
|
|
126
138
|
}
|