@vates/types 1.5.0 → 1.6.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/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/lib/xen-orchestra-xapi.d.mts +73 -2
- package/dist/xen-api.d.mts +4 -0
- package/dist/xo.d.mts +15 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { WrappedXenApiRecord, XenApiNetworkWrapped, XenApiRecord } from '../xen-api.mjs';
|
|
2
|
-
import type {
|
|
1
|
+
import { WrappedXenApiRecord, XenApiNetworkWrapped, XenApiRecord, XenApiSr, XenApiVdi, XenApiVm, XenApiVmWrapped } from '../xen-api.mjs';
|
|
2
|
+
import type { Readable } from 'node:stream';
|
|
3
|
+
import type { XoGpuGroup, XoVgpuType, XoHost, XoNetwork, XoPif, XoSr, XoUser, XoVdi, XoVm, XoVmTemplate } from '../xo.mjs';
|
|
3
4
|
type XcpPatches = {
|
|
4
5
|
changelog?: {
|
|
5
6
|
author: string;
|
|
@@ -46,5 +47,75 @@ export interface Xapi {
|
|
|
46
47
|
deleteNetwork(id: XoNetwork['id']): Promise<void>;
|
|
47
48
|
listMissingPatches(host: XoHost['id']): Promise<XcpPatches[] | XsPatches[]>;
|
|
48
49
|
pool_emergencyShutdown(): Promise<void>;
|
|
50
|
+
resumeVm(id: XoVm['id']): Promise<void>;
|
|
51
|
+
unpauseVm(id: XoVm['id']): Promise<void>;
|
|
52
|
+
startVm(id: XoVm['id'], opts?: {
|
|
53
|
+
bypassMacAddressesCheck?: boolean;
|
|
54
|
+
force?: boolean;
|
|
55
|
+
hostId?: XoHost['id'];
|
|
56
|
+
/**
|
|
57
|
+
* if startOnly is true and the VM is not halted, throw VM_BAD_POWER_STATE
|
|
58
|
+
* otherwise, unpause/resume the VM
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
startOnly?: boolean;
|
|
63
|
+
}): Promise<void>;
|
|
64
|
+
VM_import(stream: Readable, srRef?: XenApiSr['$ref'], onVmCreation?: null | ((vm: XenApiVm) => unknown)): Promise<XenApiVm['$ref']>;
|
|
65
|
+
createVm(templateUuid: XoVmTemplate['uuid'], metadataVm: {
|
|
66
|
+
affinityHost?: XoHost['id'];
|
|
67
|
+
name_label: string;
|
|
68
|
+
nameLabel?: string;
|
|
69
|
+
clone?: boolean;
|
|
70
|
+
installRepository?: XoVdi['id'] | '' | null;
|
|
71
|
+
vdis?: (/** Create VDI */ {
|
|
72
|
+
name_label: string;
|
|
73
|
+
size: number;
|
|
74
|
+
sr?: XoSr['id'];
|
|
75
|
+
name_description?: string;
|
|
76
|
+
} | /** Update VDI*/ {
|
|
77
|
+
userdevice: string;
|
|
78
|
+
name_label?: string;
|
|
79
|
+
size?: number;
|
|
80
|
+
sr?: XoSr['id'];
|
|
81
|
+
name_description?: string;
|
|
82
|
+
} | /** Destroy VDI*/ {
|
|
83
|
+
destroy: true;
|
|
84
|
+
userdevice: string;
|
|
85
|
+
})[];
|
|
86
|
+
vifs?: (/** Create/update VIF */ {
|
|
87
|
+
device?: string;
|
|
88
|
+
ipv4_allowed?: string[];
|
|
89
|
+
ipv6_allowed?: string[];
|
|
90
|
+
mac?: string;
|
|
91
|
+
mtu?: number;
|
|
92
|
+
network: string;
|
|
93
|
+
} | /** Destroy VIF */ {
|
|
94
|
+
destroy: true;
|
|
95
|
+
device: string;
|
|
96
|
+
})[];
|
|
97
|
+
existingVdis?: {
|
|
98
|
+
$SR: XoSr['id'];
|
|
99
|
+
size: number;
|
|
100
|
+
userdevice: string;
|
|
101
|
+
}[];
|
|
102
|
+
vgpuType?: XoVgpuType['id'];
|
|
103
|
+
gpuGroup?: XoGpuGroup['id'];
|
|
104
|
+
copyHostBiosStrings?: boolean;
|
|
105
|
+
}, checkLimits?: boolean, creatorId?: XoUser['id'], opts?: {
|
|
106
|
+
destroyAllVifs: boolean;
|
|
107
|
+
}): Promise<XenApiVmWrapped>;
|
|
108
|
+
VDI_destroyCloudInitConfig(vdiRef: XenApiVdi['$ref'], opts?: {
|
|
109
|
+
timeLimit?: number;
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
VM_createCloudInitConfig(vmRef: XenApiVm['$ref'], cloudConfig: string, opts?: {
|
|
112
|
+
networkConfig?: string;
|
|
113
|
+
}): Promise<XoVdi['uuid']>;
|
|
114
|
+
VM_destroy(vmRef: XenApiVm['$ref'], opts?: {
|
|
115
|
+
deleteDisks?: boolean;
|
|
116
|
+
force?: boolean;
|
|
117
|
+
bypassBlockedOperation?: boolean;
|
|
118
|
+
forceDeleteDefaultTemplate?: boolean;
|
|
119
|
+
}): Promise<void>;
|
|
49
120
|
}
|
|
50
121
|
export {};
|
package/dist/xen-api.d.mts
CHANGED
|
@@ -184,6 +184,8 @@ type XenApiVmCallMethods = {
|
|
|
184
184
|
(method: 'hard_shutdown'): Promise<void>;
|
|
185
185
|
(method: 'clean_reboot'): Promise<void>;
|
|
186
186
|
(method: 'hard_reboot'): Promise<void>;
|
|
187
|
+
(method: 'pause'): Promise<void>;
|
|
188
|
+
(method: 'suspend'): Promise<void>;
|
|
187
189
|
(method: 'record_data_source', dataSource: string): Promise<void>;
|
|
188
190
|
(method: 'forget_data_source_archives', dataSource: string): Promise<void>;
|
|
189
191
|
};
|
|
@@ -676,11 +678,13 @@ export interface XenApiSm {
|
|
|
676
678
|
other_config: Record<string, string>;
|
|
677
679
|
required_api_version: string;
|
|
678
680
|
required_cluster_stack: string[];
|
|
681
|
+
supported_image_formats?: string[];
|
|
679
682
|
type: string;
|
|
680
683
|
uuid: string;
|
|
681
684
|
vendor: string;
|
|
682
685
|
version: string;
|
|
683
686
|
}
|
|
687
|
+
export type XenApiSmWrapped = WrapperXenApi<XenApiSm, 'SM'>;
|
|
684
688
|
export interface XenApiSr {
|
|
685
689
|
$ref: Branded<'SR'>;
|
|
686
690
|
allowed_operations: STORAGE_OPERATIONS[];
|
package/dist/xo.d.mts
CHANGED
|
@@ -434,6 +434,19 @@ export type XoSr = BaseXapiXo & {
|
|
|
434
434
|
type: 'SR';
|
|
435
435
|
usage: number;
|
|
436
436
|
};
|
|
437
|
+
export type XoSm = BaseXapiXo & {
|
|
438
|
+
id: Branded<'SM'>;
|
|
439
|
+
SM_type: string;
|
|
440
|
+
vendor: string;
|
|
441
|
+
name_label: string;
|
|
442
|
+
name_description: string;
|
|
443
|
+
configuration: Record<string, string>;
|
|
444
|
+
features: Record<string, number>;
|
|
445
|
+
driver_filename: string;
|
|
446
|
+
required_cluster_stack: string[];
|
|
447
|
+
supported_image_formats: string[];
|
|
448
|
+
type: 'SM';
|
|
449
|
+
};
|
|
437
450
|
export type XoUser = {
|
|
438
451
|
authProviders?: Record<string, string>;
|
|
439
452
|
email: string;
|
|
@@ -467,6 +480,7 @@ type BaseXoVdi = BaseXapiXo & {
|
|
|
467
480
|
name_label: string;
|
|
468
481
|
other_config: Record<string, string>;
|
|
469
482
|
parent?: XoVdiUnmanaged['id'];
|
|
483
|
+
image_format?: string;
|
|
470
484
|
size: number;
|
|
471
485
|
snapshots: XoVdiSnapshot['id'][];
|
|
472
486
|
tags: string[];
|
|
@@ -555,7 +569,7 @@ export type XoVtpm = BaseXapiXo & {
|
|
|
555
569
|
id: Branded<'VTPM'>;
|
|
556
570
|
type: 'VTPM';
|
|
557
571
|
};
|
|
558
|
-
export type XapiXoRecord = XoAlarm | XoGpuGroup | XoHost | XoMessage | XoNetwork | XoPci | XoPgpu | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVgpuType | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
|
|
572
|
+
export type XapiXoRecord = XoAlarm | XoGpuGroup | XoHost | XoMessage | XoNetwork | XoPci | XoPgpu | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVgpuType | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm | XoSm;
|
|
559
573
|
export type NonXapiXoRecord = XoGroup | XoProxy | XoJob | XoBackupRepository | XoSchedule | XoServer | XoUser;
|
|
560
574
|
export type XoRecord = XapiXoRecord | NonXapiXoRecord;
|
|
561
575
|
export type AnyXoVm = XoVm | XoVmSnapshot | XoVmTemplate | XoVmController;
|