@daocloud-proto/virtnest 0.3.0-dev-1 → 0.3.0-dev-2
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/cluster.pb.ts +0 -11
- package/v1alpha1/image.pb.ts +34 -0
- package/v1alpha1/vm.pb.ts +34 -0
package/package.json
CHANGED
package/v1alpha1/cluster.pb.ts
CHANGED
|
@@ -33,14 +33,6 @@ export type ListClusterNamespacesResponse = {
|
|
|
33
33
|
items?: string[]
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export type ListClusterStorageClassesRequest = {
|
|
37
|
-
cluster?: string
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type ListClusterStorageClassesResponse = {
|
|
41
|
-
items?: string[]
|
|
42
|
-
}
|
|
43
|
-
|
|
44
36
|
export class Cluster {
|
|
45
37
|
static ListClusters(req: ListClustersRequest, initReq?: fm.InitReq): Promise<ListClustersResponse> {
|
|
46
38
|
return fm.fetchReq<ListClustersRequest, ListClustersResponse>(`/apis/virtnest.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -48,7 +40,4 @@ export class Cluster {
|
|
|
48
40
|
static ListClusterNamespaces(req: ListClusterNamespacesRequest, initReq?: fm.InitReq): Promise<ListClusterNamespacesResponse> {
|
|
49
41
|
return fm.fetchReq<ListClusterNamespacesRequest, ListClusterNamespacesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
50
42
|
}
|
|
51
|
-
static ListClusterStorageClasses(req: ListClusterStorageClassesRequest, initReq?: fm.InitReq): Promise<ListClusterStorageClassesResponse> {
|
|
52
|
-
return fm.fetchReq<ListClusterStorageClassesRequest, ListClusterStorageClassesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/storageclasses?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
53
|
-
}
|
|
54
43
|
}
|
package/v1alpha1/image.pb.ts
CHANGED
|
@@ -106,6 +106,34 @@ export type DetectKangarooResponse = {
|
|
|
106
106
|
enabled?: boolean
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export type ListSecretsRequest = {
|
|
110
|
+
cluster?: string
|
|
111
|
+
namespace?: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type ListSecretsResponse = {
|
|
115
|
+
items?: Secret[]
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type CheckSecretRequest = {
|
|
119
|
+
cluster?: string
|
|
120
|
+
namespace?: string
|
|
121
|
+
name?: string
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type CheckSecretResponse = {
|
|
125
|
+
canUse?: boolean
|
|
126
|
+
message?: string
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type Secret = {
|
|
130
|
+
name?: string
|
|
131
|
+
uid?: string
|
|
132
|
+
cluster?: string
|
|
133
|
+
namespace?: string
|
|
134
|
+
type?: string
|
|
135
|
+
}
|
|
136
|
+
|
|
109
137
|
export class Image {
|
|
110
138
|
static ListRegistries(req: ListRegistriesRequest, initReq?: fm.InitReq): Promise<ListRegistriesResponse> {
|
|
111
139
|
return fm.fetchReq<ListRegistriesRequest, ListRegistriesResponse>(`/apis/virtnest.io/v1alpha1/registries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -119,4 +147,10 @@ export class Image {
|
|
|
119
147
|
static ListArtifacts(req: ListArtifactsRequest, initReq?: fm.InitReq): Promise<ListArtifactsResponse> {
|
|
120
148
|
return fm.fetchReq<ListArtifactsRequest, ListArtifactsResponse>(`/apis/virtnest.io/v1alpha1/artifacts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
121
149
|
}
|
|
150
|
+
static ListSecrets(req: ListSecretsRequest, initReq?: fm.InitReq): Promise<ListSecretsResponse> {
|
|
151
|
+
return fm.fetchReq<ListSecretsRequest, ListSecretsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secrets?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
152
|
+
}
|
|
153
|
+
static CheckSecret(req: CheckSecretRequest, initReq?: fm.InitReq): Promise<CheckSecretResponse> {
|
|
154
|
+
return fm.fetchReq<CheckSecretRequest, CheckSecretResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}/check?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
155
|
+
}
|
|
122
156
|
}
|
package/v1alpha1/vm.pb.ts
CHANGED
|
@@ -25,6 +25,12 @@ export enum ImageSource {
|
|
|
25
25
|
s3 = "s3",
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export enum DiskOperation {
|
|
29
|
+
add = "add",
|
|
30
|
+
delete = "delete",
|
|
31
|
+
edit = "edit",
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
export enum VMOperation {
|
|
29
35
|
start = "start",
|
|
30
36
|
stop = "stop",
|
|
@@ -57,6 +63,13 @@ export enum SnapshotStatus {
|
|
|
57
63
|
snapshot_unknown = "snapshot_unknown",
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
export enum PersistentVolumeAccessMode {
|
|
67
|
+
ReadWriteOnce = "ReadWriteOnce",
|
|
68
|
+
ReadOnlyMany = "ReadOnlyMany",
|
|
69
|
+
ReadWriteMany = "ReadWriteMany",
|
|
70
|
+
ReadWriteOncePod = "ReadWriteOncePod",
|
|
71
|
+
}
|
|
72
|
+
|
|
60
73
|
export type Pagination = {
|
|
61
74
|
page?: number
|
|
62
75
|
pageSize?: number
|
|
@@ -109,6 +122,7 @@ export type CreateVMRequest = {
|
|
|
109
122
|
ssh?: SSH
|
|
110
123
|
osFamily?: OSFamily
|
|
111
124
|
osVersion?: string
|
|
125
|
+
secret?: string
|
|
112
126
|
}
|
|
113
127
|
|
|
114
128
|
export type SSH = {
|
|
@@ -149,6 +163,7 @@ export type UpdateVMRequest = {
|
|
|
149
163
|
annotations?: {[key: string]: string}
|
|
150
164
|
cpu?: Item
|
|
151
165
|
memory?: Item
|
|
166
|
+
disks?: VMDisks
|
|
152
167
|
}
|
|
153
168
|
|
|
154
169
|
export type UpdateVMResponse = {
|
|
@@ -193,6 +208,7 @@ export type GetVMResponse = {
|
|
|
193
208
|
imageUrl?: string
|
|
194
209
|
node?: string
|
|
195
210
|
allowedOperation?: AllowedOperation[]
|
|
211
|
+
secret?: string
|
|
196
212
|
}
|
|
197
213
|
|
|
198
214
|
export type VMNetwork = {
|
|
@@ -389,6 +405,8 @@ export type SystemImageVersion = {
|
|
|
389
405
|
export type DiskVolume = {
|
|
390
406
|
storageClass?: string
|
|
391
407
|
storage?: string
|
|
408
|
+
pvAccessMode?: PersistentVolumeAccessMode
|
|
409
|
+
name?: string
|
|
392
410
|
}
|
|
393
411
|
|
|
394
412
|
export type AddDiskVolumeToVMRequest = {
|
|
@@ -439,6 +457,19 @@ export type LiveMigrateVMRequest = {
|
|
|
439
457
|
export type LiveMigrateVMResponse = {
|
|
440
458
|
}
|
|
441
459
|
|
|
460
|
+
export type ListClusterStorageClassesRequest = {
|
|
461
|
+
cluster?: string
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export type ListClusterStorageClassesResponse = {
|
|
465
|
+
items?: StorageClass[]
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export type StorageClass = {
|
|
469
|
+
name?: string
|
|
470
|
+
supportAccessMode?: PersistentVolumeAccessMode[]
|
|
471
|
+
}
|
|
472
|
+
|
|
442
473
|
export class VM {
|
|
443
474
|
static ListClusterVMs(req: ListClusterVMsRequest, initReq?: fm.InitReq): Promise<ListClusterVmsResponse> {
|
|
444
475
|
return fm.fetchReq<ListClusterVMsRequest, ListClusterVmsResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/vms?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
@@ -512,4 +543,7 @@ export class VM {
|
|
|
512
543
|
static ExpandVMDiskCapacity(req: ExpandVMDiskCapacityRequest, initReq?: fm.InitReq): Promise<ExpandVMDiskCapacityResponse> {
|
|
513
544
|
return fm.fetchReq<ExpandVMDiskCapacityRequest, ExpandVMDiskCapacityResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/vms/${req["name"]}/disk-volume/${req["diskName"]}/expand-capacity`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
514
545
|
}
|
|
546
|
+
static ListClusterStorageClasses(req: ListClusterStorageClassesRequest, initReq?: fm.InitReq): Promise<ListClusterStorageClassesResponse> {
|
|
547
|
+
return fm.fetchReq<ListClusterStorageClassesRequest, ListClusterStorageClassesResponse>(`/apis/virtnest.io/v1alpha1/clusters/${req["cluster"]}/storageclasses?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
548
|
+
}
|
|
515
549
|
}
|