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