@daocloud-proto/zestu 0.1.0-dev-3146bd8a → 0.1.0-dev-732f3265
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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as ZestuIoApiTypesPage from "../../types/page.pb"
|
|
8
|
+
import * as ZestuIoApiTypesTypes from "../../types/types.pb"
|
|
8
9
|
|
|
9
10
|
export enum ImageType {
|
|
10
11
|
IMAGE_TYPE_UNSPECIFIED = "IMAGE_TYPE_UNSPECIFIED",
|
|
@@ -14,16 +15,6 @@ export enum ImageType {
|
|
|
14
15
|
IMAGE_PRIVATE = "IMAGE_PRIVATE",
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
export enum ChargeMode {
|
|
18
|
-
CHARGE_MODE_UNSPECIFIED = "CHARGE_MODE_UNSPECIFIED",
|
|
19
|
-
CHARGE_ELASTIC = "CHARGE_ELASTIC",
|
|
20
|
-
CHARGE_HOUR = "CHARGE_HOUR",
|
|
21
|
-
CHARGE_DAY = "CHARGE_DAY",
|
|
22
|
-
CHARGE_WEEK = "CHARGE_WEEK",
|
|
23
|
-
CHARGE_MONTH = "CHARGE_MONTH",
|
|
24
|
-
CHARGE_YEAR = "CHARGE_YEAR",
|
|
25
|
-
}
|
|
26
|
-
|
|
27
18
|
export enum InstanceType {
|
|
28
19
|
INSTANCE_TYPE_UNSPECIFIED = "INSTANCE_TYPE_UNSPECIFIED",
|
|
29
20
|
POD = "POD",
|
|
@@ -42,10 +33,10 @@ export enum InstanceStatus {
|
|
|
42
33
|
|
|
43
34
|
export enum NetworkType {
|
|
44
35
|
NETWORK_TYPE_UNSPECIFIED = "NETWORK_TYPE_UNSPECIFIED",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
SSH = "SSH",
|
|
37
|
+
JUPYTER = "JUPYTER",
|
|
38
|
+
VSCODE = "VSCODE",
|
|
39
|
+
CUSTOM = "CUSTOM",
|
|
49
40
|
}
|
|
50
41
|
|
|
51
42
|
export enum NetworkProtocol {
|
|
@@ -76,11 +67,27 @@ export type ContainerInstance = {
|
|
|
76
67
|
instanceId?: string
|
|
77
68
|
status?: InstanceStatus
|
|
78
69
|
charge?: ChargeInfo
|
|
79
|
-
hardware?:
|
|
70
|
+
hardware?: Hardware
|
|
80
71
|
volumeSpec?: VolumeSpec[]
|
|
81
72
|
image?: string
|
|
82
73
|
instanceSpec?: InstanceSpec
|
|
83
74
|
regionId?: string
|
|
75
|
+
servers?: Server[]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type Hardware = {
|
|
79
|
+
systemDiskSize?: string
|
|
80
|
+
gpuMemory?: string
|
|
81
|
+
cpuNum?: number
|
|
82
|
+
memory?: string
|
|
83
|
+
gpuType?: string
|
|
84
|
+
gpuNum?: number
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type Server = {
|
|
88
|
+
available?: boolean
|
|
89
|
+
type?: NetworkType
|
|
90
|
+
url?: string
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
export type CreateContainerInstanceRequest = {
|
|
@@ -110,7 +117,7 @@ export type CreateContainerInstanceResponse = {
|
|
|
110
117
|
}
|
|
111
118
|
|
|
112
119
|
export type ChargeInfo = {
|
|
113
|
-
chargeMode?:
|
|
120
|
+
chargeMode?: ZestuIoApiTypesTypes.BillingType
|
|
114
121
|
duration?: number
|
|
115
122
|
}
|
|
116
123
|
|
|
@@ -131,7 +138,6 @@ export type ServiceEnable = {
|
|
|
131
138
|
}
|
|
132
139
|
|
|
133
140
|
export type StopContainerInstanceRequest = {
|
|
134
|
-
namespace?: string
|
|
135
141
|
instanceId?: string
|
|
136
142
|
regionId?: string
|
|
137
143
|
}
|
|
@@ -141,7 +147,6 @@ export type StopContainerInstanceResponse = {
|
|
|
141
147
|
}
|
|
142
148
|
|
|
143
149
|
export type StartContainerInstanceRequest = {
|
|
144
|
-
namespace?: string
|
|
145
150
|
instanceId?: string
|
|
146
151
|
regionId?: string
|
|
147
152
|
}
|
|
@@ -151,13 +156,11 @@ export type StartContainerInstanceResponse = {
|
|
|
151
156
|
}
|
|
152
157
|
|
|
153
158
|
export type DeleteContainerInstanceRequest = {
|
|
154
|
-
namespace?: string
|
|
155
159
|
instanceId?: string
|
|
156
160
|
regionId?: string
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
export type ListContainerInstanceNetworksRequest = {
|
|
160
|
-
namespace?: string
|
|
161
164
|
instanceId?: string
|
|
162
165
|
regionId?: string
|
|
163
166
|
}
|
|
@@ -184,7 +187,6 @@ export type ContainerInstanceNetwork = {
|
|
|
184
187
|
}
|
|
185
188
|
|
|
186
189
|
export type AddContainerInstanceNetworkRequest = {
|
|
187
|
-
namespace?: string
|
|
188
190
|
instanceId?: string
|
|
189
191
|
regionId?: string
|
|
190
192
|
protocol?: NetworkProtocol
|
|
@@ -196,19 +198,8 @@ export type AddContainerInstanceNetworkResponse = {
|
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
export type DeleteContainerInstanceNetworkRequest = {
|
|
199
|
-
namespace?: string
|
|
200
201
|
instanceId?: string
|
|
201
202
|
regionId?: string
|
|
202
203
|
protocol?: NetworkProtocol
|
|
203
204
|
port?: number
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export type Region = {
|
|
207
|
-
regionId?: string
|
|
208
|
-
regionNameCh?: string
|
|
209
|
-
regionNameEng?: string
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export type ListRegionsResponse = {
|
|
213
|
-
items?: Region[]
|
|
214
205
|
}
|
|
@@ -27,7 +27,7 @@ export class ContainerInstance {
|
|
|
27
27
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.StartContainerInstanceRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.StartContainerInstanceResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/start`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
|
|
28
28
|
}
|
|
29
29
|
static DeleteContainerInstance(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.DeleteContainerInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
30
|
-
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.DeleteContainerInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}`, {...initReq, method: "DELETE"
|
|
30
|
+
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.DeleteContainerInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}`, {...initReq, method: "DELETE"})
|
|
31
31
|
}
|
|
32
32
|
static AddContainerInstanceNetwork(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.AddContainerInstanceNetworkRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.AddContainerInstanceNetworkResponse> {
|
|
33
33
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.AddContainerInstanceNetworkRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.AddContainerInstanceNetworkResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/ports`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
@@ -36,7 +36,7 @@ export class ContainerInstance {
|
|
|
36
36
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstanceNetworksRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstanceNetworksResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/ports?${fm.renderURLSearchParams(req, ["regionId", "instanceId"])}`, {...initReq, method: "GET"})
|
|
37
37
|
}
|
|
38
38
|
static DeleteContainerInstanceNetwork(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.DeleteContainerInstanceNetworkRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
39
|
-
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.DeleteContainerInstanceNetworkRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/ports`, {...initReq, method: "DELETE"
|
|
39
|
+
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.DeleteContainerInstanceNetworkRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/ports`, {...initReq, method: "DELETE"})
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export class Region {
|