@vates/types 1.0.1 → 1.1.1
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/dist/common.d.mts +56 -0
- package/dist/common.mjs +6 -0
- package/dist/lib/vates-task.d.mts +5 -0
- package/dist/lib/vates-task.mjs +1 -0
- package/dist/xen-api.d.mts +314 -344
- package/dist/xo.d.mts +191 -20
- package/package.json +5 -1
package/dist/xo.d.mts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { Branded, DOMAIN_TYPE, VM_OPERATIONS, VM_POWER_STATE } from './common.mjs';
|
|
2
|
-
type
|
|
3
|
-
$VBDs: XoVbd['id'][];
|
|
4
|
-
$VGPUs: XoVgpu['id'][];
|
|
5
|
-
$container: XoPool['id'] | XoHost['id'];
|
|
1
|
+
import type { Branded, DOMAIN_TYPE, HOST_ALLOWED_OPERATIONS, HOST_POWER_STATE, STORAGE_OPERATIONS, VDI_OPERATIONS, VDI_TYPE, VM_OPERATIONS, VM_POWER_STATE } from './common.mjs';
|
|
2
|
+
type BaseXapiXo = {
|
|
6
3
|
$pool: XoPool['id'];
|
|
7
4
|
/**
|
|
8
5
|
* @deprecated use $pool instead
|
|
9
6
|
*/
|
|
10
7
|
$poolId: XoPool['id'];
|
|
11
8
|
_xapiRef: string;
|
|
9
|
+
uuid: string;
|
|
10
|
+
};
|
|
11
|
+
type BaseXoVm = BaseXapiXo & {
|
|
12
|
+
$VBDs: XoVbd['id'][];
|
|
13
|
+
$VGPUs: XoVgpu['id'][];
|
|
14
|
+
$container: XoPool['id'] | XoHost['id'];
|
|
12
15
|
CPUs: {
|
|
13
16
|
max: number;
|
|
14
17
|
number: number;
|
|
@@ -25,22 +28,27 @@ type BaseXoVm = {
|
|
|
25
28
|
blockedOperations: Record<VM_OPERATIONS, string>;
|
|
26
29
|
boot: Record<string, string>;
|
|
27
30
|
coresPerSocket?: number;
|
|
28
|
-
cpuCap?: number
|
|
29
|
-
cpuMask?:
|
|
30
|
-
cpuWeight?: number
|
|
31
|
+
cpuCap?: number;
|
|
32
|
+
cpuMask?: number[];
|
|
33
|
+
cpuWeight?: number;
|
|
31
34
|
creation: Record<string, string>;
|
|
32
35
|
current_operations: Record<string, VM_OPERATIONS>;
|
|
33
36
|
docker?: {
|
|
34
37
|
containers?: string[];
|
|
35
38
|
enabled: boolean;
|
|
36
39
|
info?: string;
|
|
40
|
+
/** @deprecated */
|
|
37
41
|
process?: string;
|
|
38
42
|
version?: string;
|
|
39
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated use isNestedVirtEnabled instead
|
|
46
|
+
*/
|
|
40
47
|
expNestedHvm: boolean;
|
|
48
|
+
isNestedVirtEnabled: boolean;
|
|
41
49
|
hasVendorDevice: boolean;
|
|
42
50
|
high_availability: string;
|
|
43
|
-
installTime?: number
|
|
51
|
+
installTime?: number;
|
|
44
52
|
isFirmwareSupported: boolean;
|
|
45
53
|
memory: {
|
|
46
54
|
dynamic: number[];
|
|
@@ -66,7 +74,7 @@ type BaseXoVm = {
|
|
|
66
74
|
secureBoot: boolean;
|
|
67
75
|
snapshots: XoVmSnapshot['id'][];
|
|
68
76
|
startDelay: number;
|
|
69
|
-
startTime?: number
|
|
77
|
+
startTime?: number;
|
|
70
78
|
suspendSr?: XoSr['id'];
|
|
71
79
|
tags: string[];
|
|
72
80
|
vga?: string;
|
|
@@ -88,17 +96,145 @@ export type XoGroup = {
|
|
|
88
96
|
name: string;
|
|
89
97
|
users: XoUser['id'][];
|
|
90
98
|
};
|
|
91
|
-
export type XoHost = {
|
|
99
|
+
export type XoHost = BaseXapiXo & {
|
|
100
|
+
$PBDs: XoPbd['id'][];
|
|
101
|
+
$PCIs: XoPci['id'][];
|
|
102
|
+
$PGPUs: XoPgpu['id'][];
|
|
103
|
+
$PIFs: XoPif['id'][];
|
|
104
|
+
PCIs: XoPci['id'][];
|
|
105
|
+
PGPUs: XoPgpu['id'][];
|
|
106
|
+
PIFs: XoPif['id'][];
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated use cpus instead
|
|
109
|
+
*/
|
|
110
|
+
CPUs: Record<string, string>;
|
|
111
|
+
address: string;
|
|
112
|
+
agentStartTime: null | number;
|
|
113
|
+
bios_string: Record<string, string>;
|
|
114
|
+
build: string;
|
|
115
|
+
certificates?: {
|
|
116
|
+
fingerprint: string;
|
|
117
|
+
notAfter: number;
|
|
118
|
+
}[];
|
|
119
|
+
chipset_info: {
|
|
120
|
+
iommu?: boolean;
|
|
121
|
+
};
|
|
122
|
+
controlDomain?: XoVm['id'];
|
|
123
|
+
cpus: {
|
|
124
|
+
cores?: number;
|
|
125
|
+
sockets?: number;
|
|
126
|
+
};
|
|
127
|
+
current_operations: Record<string, HOST_ALLOWED_OPERATIONS>;
|
|
128
|
+
enabled: boolean;
|
|
129
|
+
hostname: string;
|
|
130
|
+
hvmCapable: boolean;
|
|
92
131
|
id: Branded<'host'>;
|
|
132
|
+
iscsiIqn: string;
|
|
133
|
+
license_expiry: null | number;
|
|
134
|
+
license_params: Record<string, string>;
|
|
135
|
+
license_server: Record<string, string>;
|
|
136
|
+
logging: Record<string, string>;
|
|
137
|
+
memory: {
|
|
138
|
+
size: number;
|
|
139
|
+
/**
|
|
140
|
+
* @deprecated
|
|
141
|
+
*/
|
|
142
|
+
total?: number;
|
|
143
|
+
usage: number;
|
|
144
|
+
};
|
|
145
|
+
multipathing: boolean;
|
|
146
|
+
name_description: string;
|
|
147
|
+
name_label: string;
|
|
148
|
+
otherConfig: Record<string, string>;
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated
|
|
151
|
+
*/
|
|
152
|
+
patches: XoHostPatch['id'][];
|
|
153
|
+
power_state: HOST_POWER_STATE;
|
|
154
|
+
powerOnMode: string;
|
|
155
|
+
productBrand: string;
|
|
156
|
+
rebootRequired: boolean;
|
|
157
|
+
residentVms: XoVm['id'][];
|
|
158
|
+
startTime: null | number;
|
|
159
|
+
supplementalPacks: {
|
|
160
|
+
author: string;
|
|
161
|
+
description: string;
|
|
162
|
+
guidance: string;
|
|
163
|
+
hosts: XoHost['id'][];
|
|
164
|
+
name: string;
|
|
165
|
+
size: number;
|
|
166
|
+
version: string;
|
|
167
|
+
vdi: XoVdi['id'];
|
|
168
|
+
}[] | {
|
|
169
|
+
author: string;
|
|
170
|
+
description: string;
|
|
171
|
+
name: string;
|
|
172
|
+
version: string;
|
|
173
|
+
}[];
|
|
174
|
+
tags: string[];
|
|
93
175
|
type: 'host';
|
|
176
|
+
version: string;
|
|
177
|
+
zstdSupported: boolean;
|
|
178
|
+
};
|
|
179
|
+
export type XoHostPatch = BaseXapiXo & {
|
|
180
|
+
id: Branded<'host_patch'>;
|
|
181
|
+
type: 'host_patch';
|
|
182
|
+
};
|
|
183
|
+
export type XoPbd = BaseXapiXo & {
|
|
184
|
+
id: Branded<'PBD'>;
|
|
185
|
+
type: 'PBD';
|
|
186
|
+
};
|
|
187
|
+
export type XoPci = BaseXapiXo & {
|
|
188
|
+
id: Branded<'PCI'>;
|
|
189
|
+
type: 'PCI';
|
|
94
190
|
};
|
|
95
|
-
export type
|
|
191
|
+
export type XoPgpu = BaseXapiXo & {
|
|
192
|
+
id: Branded<'PGPU'>;
|
|
193
|
+
type: 'PGPU';
|
|
194
|
+
};
|
|
195
|
+
export type XoPif = BaseXapiXo & {
|
|
196
|
+
id: Branded<'PIF'>;
|
|
197
|
+
type: 'PIF';
|
|
198
|
+
};
|
|
199
|
+
export type XoPool = BaseXapiXo & {
|
|
96
200
|
id: Branded<'pool'>;
|
|
97
201
|
type: 'pool';
|
|
98
202
|
};
|
|
99
|
-
export type
|
|
203
|
+
export type XoServer = {
|
|
204
|
+
allowUnauthorized: boolean;
|
|
205
|
+
enabled: boolean;
|
|
206
|
+
error?: Record<string, unknown>;
|
|
207
|
+
host: string;
|
|
208
|
+
httpProxy?: string;
|
|
209
|
+
id: Branded<'server'>;
|
|
210
|
+
label?: string;
|
|
211
|
+
poolId?: XoPool['id'];
|
|
212
|
+
poolNameDescription?: string;
|
|
213
|
+
poolNameLabel?: string;
|
|
214
|
+
readOnly: boolean;
|
|
215
|
+
status: 'connected' | 'disconnected' | 'connecting';
|
|
216
|
+
username: string;
|
|
217
|
+
};
|
|
218
|
+
export type XoSr = BaseXapiXo & {
|
|
219
|
+
$PBDs: XoPbd['id'][];
|
|
220
|
+
$container: XoPool['id'] | XoHost['id'];
|
|
221
|
+
VDIs: XoVdi['id'][];
|
|
222
|
+
allocationStrategy: 'thin' | 'thick' | 'unknown';
|
|
223
|
+
content_type: string;
|
|
224
|
+
current_operations: Record<string, STORAGE_OPERATIONS>;
|
|
100
225
|
id: Branded<'SR'>;
|
|
226
|
+
inMaintenanceMode: boolean;
|
|
227
|
+
name_description: string;
|
|
228
|
+
name_label: string;
|
|
229
|
+
other_config: Record<string, string>;
|
|
230
|
+
physical_usage: number | null;
|
|
231
|
+
shared: boolean;
|
|
232
|
+
size: number | null;
|
|
233
|
+
sm_config: Record<string, string>;
|
|
234
|
+
SR_type: string;
|
|
235
|
+
tags: string[];
|
|
101
236
|
type: 'SR';
|
|
237
|
+
usage: number;
|
|
102
238
|
};
|
|
103
239
|
export type XoUser = {
|
|
104
240
|
authProviders?: Record<string, string>;
|
|
@@ -110,19 +246,53 @@ export type XoUser = {
|
|
|
110
246
|
pw_hash: string;
|
|
111
247
|
preferences: Record<string, string>;
|
|
112
248
|
};
|
|
113
|
-
export type XoVbd = {
|
|
249
|
+
export type XoVbd = BaseXapiXo & {
|
|
250
|
+
attached: boolean;
|
|
251
|
+
bootable: boolean;
|
|
252
|
+
device: string | null;
|
|
114
253
|
id: Branded<'VBD'>;
|
|
254
|
+
is_cd_drive: boolean;
|
|
255
|
+
position: string;
|
|
256
|
+
read_only: boolean;
|
|
115
257
|
type: 'VBD';
|
|
258
|
+
VDI: XoVdi['id'];
|
|
259
|
+
VM: XoVm['id'];
|
|
260
|
+
};
|
|
261
|
+
type BaseXoVdi = BaseXapiXo & {
|
|
262
|
+
$SR: XoSr['id'];
|
|
263
|
+
$VBDs: XoVbd['id'][];
|
|
264
|
+
VDI_type: VDI_TYPE;
|
|
265
|
+
cbt_enabled?: boolean;
|
|
266
|
+
current_operations: Record<string, VDI_OPERATIONS>;
|
|
267
|
+
missing: boolean;
|
|
268
|
+
name_description: string;
|
|
269
|
+
name_label: string;
|
|
270
|
+
other_config: Record<string, string>;
|
|
271
|
+
parent?: XoVdiUnmanaged['id'];
|
|
272
|
+
size: number;
|
|
273
|
+
snapshots: XoVdiSnapshot['id'][];
|
|
274
|
+
tags: string[];
|
|
275
|
+
usage: number;
|
|
116
276
|
};
|
|
117
|
-
export type XoVdi = {
|
|
277
|
+
export type XoVdi = BaseXoVdi & {
|
|
118
278
|
id: Branded<'VDI'>;
|
|
119
279
|
type: 'VDI';
|
|
120
280
|
};
|
|
121
|
-
export type
|
|
281
|
+
export type XoVdiSnapshot = BaseXoVdi & {
|
|
282
|
+
id: Branded<'VDI-snapshot'>;
|
|
283
|
+
snapshot_time: number;
|
|
284
|
+
$snapshot_of?: XoVdi['id'];
|
|
285
|
+
type: 'VDI-snapshot';
|
|
286
|
+
};
|
|
287
|
+
export type XoVdiUnmanaged = BaseXoVdi & {
|
|
288
|
+
id: Branded<'VDI-unmanaged'>;
|
|
289
|
+
type: 'VDI-unmanaged';
|
|
290
|
+
};
|
|
291
|
+
export type XoVgpu = BaseXapiXo & {
|
|
122
292
|
id: Branded<'VGPU'>;
|
|
123
293
|
type: 'VGPU';
|
|
124
294
|
};
|
|
125
|
-
export type XoVif = {
|
|
295
|
+
export type XoVif = BaseXapiXo & {
|
|
126
296
|
id: Branded<'VIF'>;
|
|
127
297
|
type: 'VIF';
|
|
128
298
|
};
|
|
@@ -157,10 +327,11 @@ export type XoVmTemplate = BaseXoVm & {
|
|
|
157
327
|
};
|
|
158
328
|
type: 'VM-template';
|
|
159
329
|
};
|
|
160
|
-
export type XoVtpm = {
|
|
330
|
+
export type XoVtpm = BaseXapiXo & {
|
|
161
331
|
id: Branded<'VTPM'>;
|
|
162
332
|
type: 'VTPM';
|
|
163
333
|
};
|
|
164
|
-
export type XapiXoRecord = XoHost | XoPool | XoSr | XoVbd | XoVdi | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
|
|
165
|
-
export type
|
|
334
|
+
export type XapiXoRecord = XoHost | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
|
|
335
|
+
export type NonXapiXoRecord = XoGroup | XoServer | XoUser;
|
|
336
|
+
export type XoRecord = XapiXoRecord | NonXapiXoRecord;
|
|
166
337
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vates/types",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"./common": {
|
|
14
14
|
"default": "./dist/common.mjs",
|
|
15
15
|
"types": "./dist/common.d.mts"
|
|
16
|
+
},
|
|
17
|
+
"./lib/vates/*": {
|
|
18
|
+
"default": "./dist/lib/vates-*.mjs",
|
|
19
|
+
"type": "./dist/lib/vates-*.d.mts"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"type": "module",
|