@daocloud-proto/virtnest 0.1.10-dev3 → 0.1.10-dev5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/v1alpha1/vm.pb.ts +26 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/virtnest",
3
- "version":"0.1.10-dev3",
3
+ "version":"0.1.10-dev5",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
package/v1alpha1/vm.pb.ts CHANGED
@@ -7,16 +7,10 @@
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
9
  export enum OSFamily {
10
- debian = "debian",
11
- centos = "centos",
12
- ubuntu = "ubuntu",
13
- }
14
-
15
- export enum OSFamilyResponse {
16
- debian_response = "debian_response",
17
- centos_response = "centos_response",
18
- ubuntu_response = "ubuntu_response",
19
- unknown_osfamily_response = "unknown_osfamily_response",
10
+ Unknown = "Unknown",
11
+ Debian = "Debian",
12
+ CentOS = "CentOS",
13
+ Ubuntu = "Ubuntu",
20
14
  }
21
15
 
22
16
  export enum ImageSource {
@@ -65,7 +59,7 @@ export type ListClusterVmsInfo = {
65
59
  cpu?: string
66
60
  memory?: string
67
61
  createdAt?: string
68
- osFamily?: OSFamilyResponse
62
+ osFamily?: OSFamily
69
63
  }
70
64
 
71
65
  export type ListClusterVMsRequest = {
@@ -292,6 +286,24 @@ export type CloneVMRequest = {
292
286
  export type CloneVMResponse = {
293
287
  }
294
288
 
289
+ export type ListSystemImagesRequest = {
290
+ cluster?: string
291
+ }
292
+
293
+ export type ListSystemImagesResponse = {
294
+ items?: SystemImage[]
295
+ }
296
+
297
+ export type SystemImage = {
298
+ osFamily?: OSFamily
299
+ version?: SystemImageVersion[]
300
+ }
301
+
302
+ export type SystemImageVersion = {
303
+ version?: string
304
+ url?: string
305
+ }
306
+
295
307
  export class VM {
296
308
  static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
297
309
  return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -338,4 +350,7 @@ export class VM {
338
350
  static CloneVM(req: CloneVMRequest, initReq?: fm.InitReq): Promise<CloneVMResponse> {
339
351
  return fm.fetchReq<CloneVMRequest, CloneVMResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/clone`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
340
352
  }
353
+ static ListSystemImages(req: ListSystemImagesRequest, initReq?: fm.InitReq): Promise<ListSystemImagesResponse> {
354
+ return fm.fetchReq<ListSystemImagesRequest, ListSystemImagesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/system-images?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
355
+ }
341
356
  }