@daocloud-proto/virtnest 0.1.10-dev → 0.1.10-dev2

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/virtnest",
3
- "version":"0.1.10-dev",
3
+ "version":"0.1.10-dev2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,39 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../fetch.pb"
8
+
9
+ export enum RoleEnum {
10
+ cluster_admin = "cluster_admin",
11
+ cluster_edit = "cluster_edit",
12
+ cluster_view = "cluster_view",
13
+ ns_admin = "ns_admin",
14
+ ns_edit = "ns_edit",
15
+ ns_view = "ns_view",
16
+ }
17
+
18
+ export type GetUserRolesRequest = {
19
+ }
20
+
21
+ export type GetUserRolesResponse = {
22
+ platformRoles?: RoleEnum[]
23
+ clusterRoles?: {[key: string]: ClusterRoles}
24
+ }
25
+
26
+ export type ClusterRoles = {
27
+ roles?: RoleEnum[]
28
+ nsRoles?: {[key: string]: NSRoles}
29
+ }
30
+
31
+ export type NSRoles = {
32
+ roles?: RoleEnum[]
33
+ }
34
+
35
+ export class Role {
36
+ static GetUserRoles(req: GetUserRolesRequest, initReq?: fm.InitReq): Promise<GetUserRolesResponse> {
37
+ return fm.fetchReq<GetUserRolesRequest, GetUserRolesResponse>(`/apis/virtnest.io/v1alpha1/roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
38
+ }
39
+ }
package/v1alpha1/vm.pb.ts CHANGED
@@ -6,11 +6,17 @@
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
- export enum GuestOS {
10
- linux = "linux",
9
+ export enum OSFamily {
10
+ debian = "debian",
11
11
  centos = "centos",
12
12
  ubuntu = "ubuntu",
13
- unknown = "unknown",
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",
14
20
  }
15
21
 
16
22
  export enum ImageSource {
@@ -51,7 +57,7 @@ export type ListClusterVmsInfo = {
51
57
  cpu?: number
52
58
  memory?: string
53
59
  createdAt?: string
54
- guestOs?: GuestOS
60
+ osFamily?: OSFamilyResponse
55
61
  }
56
62
 
57
63
  export type ListClusterVMsRequest = {
@@ -79,6 +85,8 @@ export type CreateVMRequest = {
79
85
  cpu?: Item
80
86
  memory?: Item
81
87
  ssh?: SSH
88
+ osFamily?: OSFamily
89
+ osVersion?: string
82
90
  }
83
91
 
84
92
  export type SSH = {