@xen-orchestra/rest-api 0.2.0 → 0.3.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/open-api/oa-examples/vm-controller.oa-example.mjs +71 -0
- package/dist/open-api/oa-examples/vm-snapshot.oa-example.mjs +178 -0
- package/dist/open-api/oa-examples/vm-template.oa-example.mjs +91 -0
- package/dist/open-api/routes/routes.js +249 -27
- package/dist/vm-controller/vm-controller.controller.mjs +60 -0
- package/dist/vm-snapshots/vm-snapshot.controller.mjs +60 -0
- package/dist/vm-templates/vm-template.controller.mjs +59 -0
- package/open-api/spec/swagger.json +4489 -1422
- package/package.json +2 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const vmControllerIds = [
|
|
2
|
+
'/rest/v0/vm-controller/9b4775bd-9493-490a-9afa-f786a44caa4f',
|
|
3
|
+
'/rest/v0/vm-controller/e3fc847c-159a-48dc-bee4-cf2da216a795',
|
|
4
|
+
];
|
|
5
|
+
export const partialVmControllers = [
|
|
6
|
+
{
|
|
7
|
+
type: 'VM-controller',
|
|
8
|
+
uuid: '9b4775bd-9493-490a-9afa-f786a44caa4f',
|
|
9
|
+
href: '/rest/v0/vm-controller/9b4775bd-9493-490a-9afa-f786a44caa4f',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
type: 'VM-controller',
|
|
13
|
+
uuid: 'e3fc847c-159a-48dc-bee4-cf2da216a795',
|
|
14
|
+
href: '/rest/v0/vm-controller/e3fc847c-159a-48dc-bee4-cf2da216a795',
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
export const vmController = {
|
|
18
|
+
type: 'VM-controller',
|
|
19
|
+
addresses: {},
|
|
20
|
+
affinityHost: 'b61a5c92-700e-4966-a13b-00633f03eea8',
|
|
21
|
+
auto_poweron: false,
|
|
22
|
+
bios_strings: {},
|
|
23
|
+
blockedOperations: {},
|
|
24
|
+
boot: {},
|
|
25
|
+
CPUs: {
|
|
26
|
+
max: 8,
|
|
27
|
+
number: 8,
|
|
28
|
+
},
|
|
29
|
+
current_operations: {},
|
|
30
|
+
expNestedHvm: false,
|
|
31
|
+
viridian: false,
|
|
32
|
+
high_availability: '',
|
|
33
|
+
isFirmwareSupported: true,
|
|
34
|
+
memory: {
|
|
35
|
+
dynamic: [2785017856, 2785017856],
|
|
36
|
+
static: [2785017856, 2785017856],
|
|
37
|
+
size: 2785017856,
|
|
38
|
+
},
|
|
39
|
+
installTime: null,
|
|
40
|
+
name_description: 'The domain which manages physical devices and manages other domains',
|
|
41
|
+
name_label: 'Control domain on host: localhost.localdomain',
|
|
42
|
+
needsVtpm: false,
|
|
43
|
+
other: {
|
|
44
|
+
storage_driver_domain: 'OpaqueRef:254474d5-77b7-0947-da0f-af869dd2ca82',
|
|
45
|
+
is_system_domain: 'true',
|
|
46
|
+
perfmon: '<config><variable><name value="fs_usage"/><alarm_trigger_level value="0.9"/><alarm_trigger_period value="60"/><alarm_auto_inhibit_period value="3600"/></variable><variable><name value="mem_usage"/><alarm_trigger_level value="0.95"/><alarm_trigger_period value="60"/><alarm_auto_inhibit_period value="3600"/></variable><variable><name value="log_fs_usage"/><alarm_trigger_level value="0.9"/><alarm_trigger_period value="60"/><alarm_auto_inhibit_period value="3600"/></variable></config>',
|
|
47
|
+
},
|
|
48
|
+
os_version: null,
|
|
49
|
+
power_state: 'Running',
|
|
50
|
+
hasVendorDevice: false,
|
|
51
|
+
snapshots: [],
|
|
52
|
+
startDelay: 0,
|
|
53
|
+
startTime: null,
|
|
54
|
+
secureBoot: false,
|
|
55
|
+
tags: [],
|
|
56
|
+
VIFs: [],
|
|
57
|
+
VTPMs: [],
|
|
58
|
+
virtualizationMode: 'pv',
|
|
59
|
+
xenTools: false,
|
|
60
|
+
$containe: 'b61a5c92-700e-4966-a13b-00633f03eea8',
|
|
61
|
+
$VBDs: [],
|
|
62
|
+
VGPUs: [],
|
|
63
|
+
$VGPUs: [],
|
|
64
|
+
xenStoreData: {},
|
|
65
|
+
PV_args: '',
|
|
66
|
+
id: '9b4775bd-9493-490a-9afa-f786a44caa4f',
|
|
67
|
+
uuid: '9b4775bd-9493-490a-9afa-f786a44caa4f',
|
|
68
|
+
$pool: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
69
|
+
$poolId: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
70
|
+
_xapiRef: 'OpaqueRef:ca27fcfc-5083-d039-e752-2e6c3364bde9',
|
|
71
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
export const vmSnapshotIds = [
|
|
2
|
+
'/rest/v0/vm-snapshots/d68fca2c-41e6-be87-d790-105c1642a090',
|
|
3
|
+
'/rest/v0/vm-snapshots/926ed61e-f8c9-8619-da05-1f454ed3dec9',
|
|
4
|
+
];
|
|
5
|
+
export const partialVmSnapshots = [
|
|
6
|
+
{
|
|
7
|
+
uuid: '926ed61e-f8c9-8619-da05-1f454ed3dec9',
|
|
8
|
+
snapshot_time: 1726489407,
|
|
9
|
+
$snapshot_of: '4127cb83-5a72-21fb-29de-3c9823ea5f43',
|
|
10
|
+
href: '/rest/v0/vm-snapshots/926ed61e-f8c9-8619-da05-1f454ed3dec9',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
uuid: '063ff4d6-f3b2-cf64-42b5-ae2cc51c1643',
|
|
14
|
+
snapshot_time: 1732707379,
|
|
15
|
+
$snapshot_of: 'fa8e50dd-68d6-3233-a580-96d1e8103cdd',
|
|
16
|
+
href: '/rest/v0/vm-snapshots/063ff4d6-f3b2-cf64-42b5-ae2cc51c1643',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
export const vmSnapshot = {
|
|
20
|
+
$pool: 'string',
|
|
21
|
+
_xapiRef: 'string',
|
|
22
|
+
uuid: 'string',
|
|
23
|
+
$VBDs: ['string'],
|
|
24
|
+
$VGPUs: ['string'],
|
|
25
|
+
$container: 'string',
|
|
26
|
+
CPUs: {
|
|
27
|
+
number: 0,
|
|
28
|
+
max: 0,
|
|
29
|
+
},
|
|
30
|
+
PV_args: 'string',
|
|
31
|
+
VGPUs: ['string'],
|
|
32
|
+
VIFs: ['string'],
|
|
33
|
+
VTPMs: ['string'],
|
|
34
|
+
addresses: {
|
|
35
|
+
additionalProp1: 'string',
|
|
36
|
+
additionalProp2: 'string',
|
|
37
|
+
additionalProp3: 'string',
|
|
38
|
+
},
|
|
39
|
+
affinityHost: 'string',
|
|
40
|
+
attachedPcis: ['string'],
|
|
41
|
+
auto_poweron: true,
|
|
42
|
+
bios_strings: {
|
|
43
|
+
additionalProp1: 'string',
|
|
44
|
+
additionalProp2: 'string',
|
|
45
|
+
additionalProp3: 'string',
|
|
46
|
+
},
|
|
47
|
+
blockedOperations: {
|
|
48
|
+
destroy: 'string',
|
|
49
|
+
provision: 'string',
|
|
50
|
+
shutdown: 'string',
|
|
51
|
+
assert_operation_valid: 'string',
|
|
52
|
+
awaiting_memory_live: 'string',
|
|
53
|
+
call_plugin: 'string',
|
|
54
|
+
changing_dynamic_range: 'string',
|
|
55
|
+
changing_memory_limits: 'string',
|
|
56
|
+
changing_memory_live: 'string',
|
|
57
|
+
changing_NVRAM: 'string',
|
|
58
|
+
changing_shadow_memory: 'string',
|
|
59
|
+
changing_shadow_memory_live: 'string',
|
|
60
|
+
changing_static_range: 'string',
|
|
61
|
+
changing_VCPUs: 'string',
|
|
62
|
+
changing_VCPUs_live: 'string',
|
|
63
|
+
checkpoint: 'string',
|
|
64
|
+
clean_reboot: 'string',
|
|
65
|
+
clean_shutdown: 'string',
|
|
66
|
+
clone: 'string',
|
|
67
|
+
copy: 'string',
|
|
68
|
+
create_template: 'string',
|
|
69
|
+
create_vtpm: 'string',
|
|
70
|
+
csvm: 'string',
|
|
71
|
+
data_source_op: 'string',
|
|
72
|
+
export: 'string',
|
|
73
|
+
get_boot_record: 'string',
|
|
74
|
+
hard_reboot: 'string',
|
|
75
|
+
hard_shutdown: 'string',
|
|
76
|
+
import: 'string',
|
|
77
|
+
make_into_template: 'string',
|
|
78
|
+
metadata_export: 'string',
|
|
79
|
+
migrate_send: 'string',
|
|
80
|
+
pause: 'string',
|
|
81
|
+
pool_migrate: 'string',
|
|
82
|
+
power_state_reset: 'string',
|
|
83
|
+
query_services: 'string',
|
|
84
|
+
resume: 'string',
|
|
85
|
+
resume_on: 'string',
|
|
86
|
+
revert: 'string',
|
|
87
|
+
reverting: 'string',
|
|
88
|
+
send_sysrq: 'string',
|
|
89
|
+
send_trigger: 'string',
|
|
90
|
+
snapshot: 'string',
|
|
91
|
+
snapshot_with_quiesce: 'string',
|
|
92
|
+
start: 'string',
|
|
93
|
+
start_on: 'string',
|
|
94
|
+
suspend: 'string',
|
|
95
|
+
unpause: 'string',
|
|
96
|
+
update_allowed_operations: 'string',
|
|
97
|
+
},
|
|
98
|
+
boot: {
|
|
99
|
+
additionalProp1: 'string',
|
|
100
|
+
additionalProp2: 'string',
|
|
101
|
+
additionalProp3: 'string',
|
|
102
|
+
},
|
|
103
|
+
coresPerSocket: 0,
|
|
104
|
+
cpuCap: 0,
|
|
105
|
+
cpuMask: [0],
|
|
106
|
+
cpuWeight: 0,
|
|
107
|
+
creation: {
|
|
108
|
+
additionalProp1: 'string',
|
|
109
|
+
additionalProp2: 'string',
|
|
110
|
+
additionalProp3: 'string',
|
|
111
|
+
},
|
|
112
|
+
current_operations: {
|
|
113
|
+
additionalProp1: 'destroy',
|
|
114
|
+
additionalProp2: 'destroy',
|
|
115
|
+
additionalProp3: 'destroy',
|
|
116
|
+
},
|
|
117
|
+
docker: {
|
|
118
|
+
version: 'string',
|
|
119
|
+
process: 'string',
|
|
120
|
+
info: 'string',
|
|
121
|
+
enabled: true,
|
|
122
|
+
containers: ['string'],
|
|
123
|
+
},
|
|
124
|
+
expNestedHvm: true,
|
|
125
|
+
hasVendorDevice: true,
|
|
126
|
+
high_availability: 'string',
|
|
127
|
+
installTime: 0,
|
|
128
|
+
isFirmwareSupported: true,
|
|
129
|
+
memory: {
|
|
130
|
+
usage: 0,
|
|
131
|
+
static: [0],
|
|
132
|
+
size: 0,
|
|
133
|
+
dynamic: [0],
|
|
134
|
+
},
|
|
135
|
+
mainIpAddress: 'string',
|
|
136
|
+
managementAgentDetected: true,
|
|
137
|
+
name_description: 'string',
|
|
138
|
+
name_label: 'string',
|
|
139
|
+
needsVtpm: true,
|
|
140
|
+
nicType: 'string',
|
|
141
|
+
notes: 'string',
|
|
142
|
+
os_version: {
|
|
143
|
+
additionalProp1: 'string',
|
|
144
|
+
additionalProp2: 'string',
|
|
145
|
+
additionalProp3: 'string',
|
|
146
|
+
},
|
|
147
|
+
other: {
|
|
148
|
+
additionalProp1: 'string',
|
|
149
|
+
additionalProp2: 'string',
|
|
150
|
+
additionalProp3: 'string',
|
|
151
|
+
},
|
|
152
|
+
parent: 'string',
|
|
153
|
+
power_state: 'Running',
|
|
154
|
+
pvDriversDetected: true,
|
|
155
|
+
pvDriversUpToDate: true,
|
|
156
|
+
pvDriversVersion: 'string',
|
|
157
|
+
resourceSet: 'string',
|
|
158
|
+
secureBoot: true,
|
|
159
|
+
snapshots: ['string'],
|
|
160
|
+
startDelay: 0,
|
|
161
|
+
startTime: 0,
|
|
162
|
+
suspendSr: 'string',
|
|
163
|
+
tags: ['string'],
|
|
164
|
+
vga: 'string',
|
|
165
|
+
videoram: 0,
|
|
166
|
+
viridian: true,
|
|
167
|
+
virtualizationMode: 'hvm',
|
|
168
|
+
xenStoreData: {
|
|
169
|
+
additionalProp1: 'string',
|
|
170
|
+
additionalProp2: 'string',
|
|
171
|
+
additionalProp3: 'string',
|
|
172
|
+
},
|
|
173
|
+
$snapshot_of: 'string',
|
|
174
|
+
id: 'string',
|
|
175
|
+
snapshot_time: 0,
|
|
176
|
+
suspendVdi: 'string',
|
|
177
|
+
type: 'VM-snapshot',
|
|
178
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export const vmTemplateIds = [
|
|
2
|
+
'/rest/v0/vm-templates/fe3d015b-d08e-1c68-9587-64aff7f9e5f5-7279a78a-4756-4fc3-99f0-3e7694c0319e',
|
|
3
|
+
'/rest/v0/vm-templates/fe3d015b-d08e-1c68-9587-64aff7f9e5f5-a3d70e4d-c5ac-4dfb-999b-30a0a7efe546',
|
|
4
|
+
];
|
|
5
|
+
export const partialVmTemplates = [
|
|
6
|
+
{
|
|
7
|
+
id: 'fe3d015b-d08e-1c68-9587-64aff7f9e5f5-7279a78a-4756-4fc3-99f0-3e7694c0319e',
|
|
8
|
+
isDefaultTemplate: true,
|
|
9
|
+
name_label: 'NeoKylin Linux Server 7',
|
|
10
|
+
href: '/rest/v0/vm-templates/fe3d015b-d08e-1c68-9587-64aff7f9e5f5-7279a78a-4756-4fc3-99f0-3e7694c0319e',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 'fe3d015b-d08e-1c68-9587-64aff7f9e5f5-a3d70e4d-c5ac-4dfb-999b-30a0a7efe546',
|
|
14
|
+
isDefaultTemplate: true,
|
|
15
|
+
name_label: 'CentOS Stream 9',
|
|
16
|
+
href: '/rest/v0/vm-templates/fe3d015b-d08e-1c68-9587-64aff7f9e5f5-a3d70e4d-c5ac-4dfb-999b-30a0a7efe546',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
export const vmTemplate = {
|
|
20
|
+
type: 'VM-template',
|
|
21
|
+
addresses: {},
|
|
22
|
+
auto_poweron: false,
|
|
23
|
+
bios_strings: {},
|
|
24
|
+
blockedOperations: {},
|
|
25
|
+
boot: {
|
|
26
|
+
firmware: 'bios',
|
|
27
|
+
order: 'cdn',
|
|
28
|
+
},
|
|
29
|
+
CPUs: {
|
|
30
|
+
max: 1,
|
|
31
|
+
number: 1,
|
|
32
|
+
},
|
|
33
|
+
current_operations: {},
|
|
34
|
+
expNestedHvm: false,
|
|
35
|
+
viridian: false,
|
|
36
|
+
high_availability: '',
|
|
37
|
+
isFirmwareSupported: true,
|
|
38
|
+
memory: {
|
|
39
|
+
dynamic: [4294967296, 4294967296],
|
|
40
|
+
static: [2147483648, 4294967296],
|
|
41
|
+
size: 4294967296,
|
|
42
|
+
},
|
|
43
|
+
installTime: null,
|
|
44
|
+
name_description: 'To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>',
|
|
45
|
+
name_label: 'Oracle Linux 7',
|
|
46
|
+
needsVtpm: false,
|
|
47
|
+
other: {
|
|
48
|
+
default_template: 'true',
|
|
49
|
+
import_task: 'OpaqueRef:335a2d25-736f-77aa-bd27-1016e2e4d29f',
|
|
50
|
+
mac_seed: 'f11d04a8-64cc-468a-b079-17039a67cf8c',
|
|
51
|
+
linux_template: 'true',
|
|
52
|
+
'install-methods': 'cdrom,nfs,http,ftp',
|
|
53
|
+
disks: '<provision><disk bootable="true" device="0" size="10737418240" sr="" type="system"/></provision>',
|
|
54
|
+
},
|
|
55
|
+
os_version: null,
|
|
56
|
+
power_state: 'Halted',
|
|
57
|
+
hasVendorDevice: false,
|
|
58
|
+
snapshots: [],
|
|
59
|
+
startDelay: 0,
|
|
60
|
+
startTime: null,
|
|
61
|
+
secureBoot: false,
|
|
62
|
+
tags: [],
|
|
63
|
+
VIFs: [],
|
|
64
|
+
VTPMs: [],
|
|
65
|
+
virtualizationMode: 'hvm',
|
|
66
|
+
$container: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
67
|
+
$VBDs: [],
|
|
68
|
+
VGPUs: [],
|
|
69
|
+
$VGPUs: [],
|
|
70
|
+
xenStoreData: {},
|
|
71
|
+
vga: 'std',
|
|
72
|
+
videoram: '8',
|
|
73
|
+
id: 'b7569d99-30f8-178a-7d94-801de3e29b5b-f873abe0-b138-4995-8f6f-498b423d234d',
|
|
74
|
+
isDefaultTemplate: true,
|
|
75
|
+
template_info: {
|
|
76
|
+
disks: [
|
|
77
|
+
{
|
|
78
|
+
bootable: true,
|
|
79
|
+
device: '0',
|
|
80
|
+
size: 10737418240,
|
|
81
|
+
type: 'system',
|
|
82
|
+
SR: '',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
install_methods: ['cdrom', 'nfs', 'http', 'ftp'],
|
|
86
|
+
},
|
|
87
|
+
uuid: 'f873abe0-b138-4995-8f6f-498b423d234d',
|
|
88
|
+
$pool: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
89
|
+
$poolId: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
90
|
+
_xapiRef: 'OpaqueRef:3a9b74fe-57d5-52f7-31ec-fbb0de9e8a1e',
|
|
91
|
+
};
|