@daocloud-proto/zestu 0.1.0-dev-8b3f1a50 → 0.1.0-dev-c3ec2d75

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.1.0-dev-8b3f1a50",
3
+ "version":"v0.1.0-dev-c3ec2d75",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,6 +6,17 @@
6
6
 
7
7
  import * as ZestuIoApiTypesPage from "../../types/page.pb"
8
8
  import * as ZestuIoApiTypesTypes from "../../types/types.pb"
9
+
10
+ export enum RegisterAction {
11
+ AddOrUpdate = "AddOrUpdate",
12
+ Delete = "Delete",
13
+ }
14
+
15
+ export enum GpuType {
16
+ VGPU = "VGPU",
17
+ GPU = "GPU",
18
+ }
19
+
9
20
  export type ListResourcesRequest = {
10
21
  model?: string[]
11
22
  regionId?: string
@@ -36,7 +47,9 @@ export type ResourceDetail = {
36
47
  cpuFamily?: string
37
48
  memory?: string
38
49
  systemDisk?: string
50
+ gpuType?: GpuType
39
51
  gpuMemory?: string
52
+ gpuCore?: string
40
53
  }
41
54
 
42
55
  export type ResourceGPU = {
@@ -44,6 +57,7 @@ export type ResourceGPU = {
44
57
  driverVersion?: string
45
58
  cudaVersion?: string
46
59
  connection?: string
60
+ vendor?: string
47
61
  }
48
62
 
49
63
  export type ResourcePrice = {
@@ -67,4 +81,38 @@ export type GetSkuSaleableRequest = {
67
81
 
68
82
  export type GetSkuSaleableResponse = {
69
83
  saleable?: boolean
84
+ }
85
+
86
+ export type RegisterResourceRequest = {
87
+ clusterName?: string
88
+ nodeName?: string
89
+ nodeIp?: string
90
+ deviceVendor?: string
91
+ deviceModel?: string
92
+ gpuMemory?: string
93
+ deviceQuantity?: RegisterResourceQuantity
94
+ cpuQuantity?: RegisterResourceQuantity
95
+ memoryQuantity?: RegisterResourceQuantity
96
+ storageQuantity?: RegisterResourceQuantity
97
+ gpuDevices?: NvidiaDevices[]
98
+ gpuType?: string
99
+ action?: RegisterAction
100
+ cpuVendor?: string
101
+ }
102
+
103
+ export type RegisterResourceQuantity = {
104
+ allocatable?: string
105
+ allocated?: string
106
+ }
107
+
108
+ export type NvidiaDevices = {
109
+ uuid?: string
110
+ deviceName?: string
111
+ splitCount?: string
112
+ memoryQuantity?: RegisterResourceQuantity
113
+ coreQuantity?: RegisterResourceQuantity
114
+ }
115
+
116
+ export type RegisterResourceResponse = {
117
+ message?: string
70
118
  }
@@ -86,4 +86,7 @@ export class Agent {
86
86
  static PushEvent(req: ZestuIoApiMeteringV1alpha1Metering.PushEventRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
87
87
  return fm.fetchReq<ZestuIoApiMeteringV1alpha1Metering.PushEventRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/events/push`, {...initReq, method: "POST", body: JSON.stringify(req)})
88
88
  }
89
+ static RegisterResource(req: ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse> {
90
+ return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.RegisterResourceRequest, ZestuIoApiResourcesV1alpha1Resources.RegisterResourceResponse>(`/apis/zestu.io/v1/cluster/${req["clusterName"]}/resources`, {...initReq, method: "POST", body: JSON.stringify(req)})
91
+ }
89
92
  }