@xen-orchestra/rest-api 0.1.0 → 0.1.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.
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const vmIds = [
|
|
2
|
+
'/rest/v0/vms/f07ab729-c0e8-721c-45ec-f11276377030',
|
|
3
|
+
'/rest/v0/vms/d5d1c4a3-4c5e-ca7b-6be8-33c824f87571',
|
|
4
|
+
];
|
|
5
|
+
export const partialVms = [
|
|
6
|
+
{
|
|
7
|
+
name_label: 'foo',
|
|
8
|
+
power_state: 'Running',
|
|
9
|
+
uuid: 'f07ab729-c0e8-721c-45ec-f11276377030',
|
|
10
|
+
href: '/rest/v0/vms/f07ab729-c0e8-721c-45ec-f11276377030',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name_label: 'foo_bar',
|
|
14
|
+
power_state: 'Halted',
|
|
15
|
+
uuid: 'd5d1c4a3-4c5e-ca7b-6be8-33c824f87571',
|
|
16
|
+
href: '/rest/v0/vms/d5d1c4a3-4c5e-ca7b-6be8-33c824f87571',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
export const vm = {
|
|
20
|
+
type: 'VM',
|
|
21
|
+
addresses: {},
|
|
22
|
+
auto_poweron: false,
|
|
23
|
+
bios_strings: {
|
|
24
|
+
'bios-vendor': 'Xen',
|
|
25
|
+
'bios-version': '',
|
|
26
|
+
'system-manufacturer': 'Xen',
|
|
27
|
+
'system-product-name': 'HVM domU',
|
|
28
|
+
'system-version': '',
|
|
29
|
+
'system-serial-number': '',
|
|
30
|
+
'hp-rombios': '',
|
|
31
|
+
'oem-1': 'Xen',
|
|
32
|
+
'oem-2': 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d',
|
|
33
|
+
},
|
|
34
|
+
blockedOperations: {},
|
|
35
|
+
boot: {
|
|
36
|
+
firmware: 'bios',
|
|
37
|
+
order: 'cd',
|
|
38
|
+
},
|
|
39
|
+
CPUs: {
|
|
40
|
+
max: 2,
|
|
41
|
+
number: 2,
|
|
42
|
+
},
|
|
43
|
+
creation: {
|
|
44
|
+
date: '2024-12-18T15:08:43.142Z',
|
|
45
|
+
template: 'bfa83003-ac1a-dde9-6a44-6cca5fd3e735',
|
|
46
|
+
user: 'd558dd75-c928-45f6-b8e3-4375bdda59f8',
|
|
47
|
+
},
|
|
48
|
+
current_operations: {},
|
|
49
|
+
expNestedHvm: false,
|
|
50
|
+
viridian: false,
|
|
51
|
+
high_availability: '',
|
|
52
|
+
isFirmwareSupported: true,
|
|
53
|
+
memory: {
|
|
54
|
+
dynamic: [4294967296, 4294967296],
|
|
55
|
+
static: [2147483648, 4294967296],
|
|
56
|
+
size: 4294967296,
|
|
57
|
+
},
|
|
58
|
+
installTime: 1734534522,
|
|
59
|
+
name_description: 'Debian 12 Cloud-Init Ready Hub Template',
|
|
60
|
+
name_label: 'MRA XOA',
|
|
61
|
+
needsVtpm: false,
|
|
62
|
+
other: {
|
|
63
|
+
'xo:f07ab729': '{"creation":{"date":"2024-12-18T15:08:43.142Z","template":"bfa83003-ac1a-dde9-6a44-6cca5fd3e735","user":"d558dd75-c928-45f6-b8e3-4375bdda59f8"}}',
|
|
64
|
+
'xo:resource:namespace': 'Debian12',
|
|
65
|
+
'xo:resource:xva:version': '1.0.0',
|
|
66
|
+
'xo:resource:xva:id': 'e2fb63ba-1a5d-7527-bfca-14fef610bf6f',
|
|
67
|
+
'xo:resource:installedTemplate:uuid': 'bfa83003-ac1a-dde9-6a44-6cca5fd3e735',
|
|
68
|
+
import_task: 'OpaqueRef:7c274dba-70ef-1f28-ab31-9c7ef5b26c51',
|
|
69
|
+
mac_seed: 'ebcb83b9-b96d-6341-931c-9d5105656bf2',
|
|
70
|
+
vgpu_pci: '',
|
|
71
|
+
base_template_name: 'Debian Jessie 8.0',
|
|
72
|
+
'install-methods': 'cdrom,nfs,http,ftp',
|
|
73
|
+
linux_template: 'true',
|
|
74
|
+
},
|
|
75
|
+
os_version: null,
|
|
76
|
+
power_state: 'Halted',
|
|
77
|
+
hasVendorDevice: false,
|
|
78
|
+
snapshots: [],
|
|
79
|
+
startDelay: 0,
|
|
80
|
+
startTime: null,
|
|
81
|
+
secureBoot: false,
|
|
82
|
+
tags: [],
|
|
83
|
+
VIFs: ['803382fb-9d69-fbf7-8fef-2b3a8adfce5a'],
|
|
84
|
+
VTPMs: [],
|
|
85
|
+
virtualizationMode: 'hvm',
|
|
86
|
+
$container: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
87
|
+
$VBDs: ['43ecda28-e716-a60e-5322-ee6597d07aec', 'a30d24aa-188c-dc6d-6ee3-5bf1e504a3e9'],
|
|
88
|
+
VGPUs: [],
|
|
89
|
+
$VGPUs: [],
|
|
90
|
+
xenStoreData: {
|
|
91
|
+
'vm-data/mmio-hole-size': '268435456',
|
|
92
|
+
'vm-data': '',
|
|
93
|
+
},
|
|
94
|
+
vga: 'cirrus',
|
|
95
|
+
videoram: 4,
|
|
96
|
+
id: 'f07ab729-c0e8-721c-45ec-f11276377030',
|
|
97
|
+
uuid: 'f07ab729-c0e8-721c-45ec-f11276377030',
|
|
98
|
+
$pool: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
99
|
+
$poolId: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
|
|
100
|
+
_xapiRef: 'OpaqueRef:ffdf8863-5331-9394-5c1b-d1db7de20a76',
|
|
101
|
+
};
|
|
@@ -10,7 +10,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
10
10
|
import { Example, Get, Path, Query, Request, Response, Route, Security } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
|
-
import { partialVms, vm, vmIds } from '../open-api/examples/vm.example.mjs';
|
|
13
|
+
import { partialVms, vm, vmIds } from '../open-api/oa-examples/vm.oa-example.mjs';
|
|
14
14
|
import { RestApi } from '../rest-api/rest-api.mjs';
|
|
15
15
|
import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
|
|
16
16
|
let VmController = class VmController extends XapiXoController {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
7
7
|
"name": "@xen-orchestra/rest-api",
|
|
8
8
|
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/rest-api",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.2",
|
|
10
10
|
"description": "REST API to manage your XOA",
|
|
11
11
|
"license": "AGPL-3.0-or-later",
|
|
12
12
|
"private": false,
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typescript-eslint": "^8.23.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vates/types": "^
|
|
31
|
+
"@vates/types": "^1.0.0",
|
|
32
32
|
"@xen-orchestra/log": "^0.7.1",
|
|
33
33
|
"complex-matcher": "^0.7.1",
|
|
34
34
|
"inversify": "^6.2.2",
|