@daocloud-proto/virtnest 0.8.0-dev-1 → 0.8.0-dev-3
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 +1 -1
- package/v1alpha1/vm.pb.ts +1 -0
- package/v1alpha1/vmtemplate.pb.ts +28 -0
package/package.json
CHANGED
package/v1alpha1/vm.pb.ts
CHANGED
|
@@ -105,6 +105,7 @@ export type MultusNetworkInfoItem = {
|
|
|
105
105
|
subnet?: string
|
|
106
106
|
gateway?: string
|
|
107
107
|
vlanId?: string
|
|
108
|
+
ipPool?: IPPool
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
export type MultusConfigInfo = {
|
|
@@ -119,6 +120,11 @@ export type NetworkInterfaceInfo = {
|
|
|
119
120
|
multusConfigs?: MultusConfigInfo[]
|
|
120
121
|
}
|
|
121
122
|
|
|
123
|
+
export type IPPool = {
|
|
124
|
+
ipv4?: string[]
|
|
125
|
+
ipv6?: string[]
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
export type VMDisks = {
|
|
123
129
|
systemVolume?: DiskVolume
|
|
124
130
|
dataVolumes?: DiskVolume[]
|
|
@@ -155,6 +161,22 @@ export type DeleteVMTemplateRequest = {
|
|
|
155
161
|
export type DeleteVMTemplateResponse = {
|
|
156
162
|
}
|
|
157
163
|
|
|
164
|
+
export type UpdateCustomResourceRequest = {
|
|
165
|
+
name?: string
|
|
166
|
+
data?: string
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type UpdateCustomResourceResponse = {
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type GetCustomResourceRequest = {
|
|
173
|
+
name?: string
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type GetCustomResourceResponse = {
|
|
177
|
+
data?: string
|
|
178
|
+
}
|
|
179
|
+
|
|
158
180
|
export class VMTemplate {
|
|
159
181
|
static ListVMTemplates(req: ListVMTemplatesRequest, initReq?: fm.InitReq): Promise<ListVMTemplatesResponse> {
|
|
160
182
|
return fm.fetchReq<ListVMTemplatesRequest, ListVMTemplatesResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -168,4 +190,10 @@ export class VMTemplate {
|
|
|
168
190
|
static CreateVMTemplateByVM(req: CreateVMTemplateByVMRequest, initReq?: fm.InitReq): Promise<CreateVMTemplateByVMResponse> {
|
|
169
191
|
return fm.fetchReq<CreateVMTemplateByVMRequest, CreateVMTemplateByVMResponse>(`/apis/virtnest.io/v1alpha1/vmtemplate-by-vm`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
170
192
|
}
|
|
193
|
+
static UpdateCustomResource(req: UpdateCustomResourceRequest, initReq?: fm.InitReq): Promise<UpdateCustomResourceResponse> {
|
|
194
|
+
return fm.fetchReq<UpdateCustomResourceRequest, UpdateCustomResourceResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates/${req["name"]}/custom-resource`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
195
|
+
}
|
|
196
|
+
static GetCustomResource(req: GetCustomResourceRequest, initReq?: fm.InitReq): Promise<GetCustomResourceResponse> {
|
|
197
|
+
return fm.fetchReq<GetCustomResourceRequest, GetCustomResourceResponse>(`/apis/virtnest.io/v1alpha1/vmtemplates/${req["name"]}/custom-resource?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
198
|
+
}
|
|
171
199
|
}
|