@xen-orchestra/rest-api 0.21.3 → 0.22.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/events/event.class.mjs +10 -4
- package/dist/events/event.service.mjs +17 -8
- package/dist/open-api/oa-examples/pool.oa-example.mjs +0 -1
- package/dist/open-api/routes/routes.js +9 -9
- package/dist/rest-api/rest-api.mjs +1 -1
- package/dist/tasks/task.controller.mjs +2 -2
- package/dist/vms/vm.controller.mjs +2 -1
- package/dist/vms/vm.service.mjs +3 -2
- package/open-api/spec/swagger.json +18 -17
- package/package.json +2 -2
|
@@ -47,7 +47,7 @@ export class Subscriber {
|
|
|
47
47
|
this.#manager.removeSubscriber(this.id);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
export class
|
|
50
|
+
export class XoListener extends Listener {
|
|
51
51
|
#type;
|
|
52
52
|
#alarmService;
|
|
53
53
|
constructor(type, eventEmitter, alarmService) {
|
|
@@ -59,10 +59,16 @@ export class XapiXoListener extends Listener {
|
|
|
59
59
|
let _object = object;
|
|
60
60
|
let _prevObject = previousObj;
|
|
61
61
|
if (this.#type === 'alarm') {
|
|
62
|
-
if (object
|
|
62
|
+
if (object !== undefined &&
|
|
63
|
+
'type' in object &&
|
|
64
|
+
object.type === 'message' &&
|
|
65
|
+
this.#alarmService?.isAlarm(object)) {
|
|
63
66
|
_object = this.#alarmService.parseAlarm(object);
|
|
64
67
|
}
|
|
65
|
-
if (previousObj
|
|
68
|
+
if (previousObj !== undefined &&
|
|
69
|
+
'type' in previousObj &&
|
|
70
|
+
previousObj.type === 'message' &&
|
|
71
|
+
this.#alarmService?.isAlarm(previousObj)) {
|
|
66
72
|
_prevObject = this.#alarmService.parseAlarm(previousObj);
|
|
67
73
|
}
|
|
68
74
|
}
|
|
@@ -79,7 +85,7 @@ export class XapiXoListener extends Listener {
|
|
|
79
85
|
return;
|
|
80
86
|
}
|
|
81
87
|
// if _object === undefined, this means we are on a remove event, so _prevObject will not be undefined
|
|
82
|
-
return _object ?? _prevObject;
|
|
88
|
+
return { $subscription: this.#type, ...(_object ?? _prevObject) };
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
export class PingListener extends Listener {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from '@xen-orchestra/log';
|
|
2
|
-
import { PingListener, Subscriber, SubscriberManager,
|
|
2
|
+
import { PingListener, Subscriber, SubscriberManager, XoListener } from './event.class.mjs';
|
|
3
3
|
import { AlarmService } from '../alarms/alarm.service.mjs';
|
|
4
4
|
const log = createLogger('xo:rest-api:event-service');
|
|
5
5
|
export class EventService {
|
|
@@ -18,19 +18,28 @@ export class EventService {
|
|
|
18
18
|
this.#alarmService = restApi.ioc.get(AlarmService);
|
|
19
19
|
}
|
|
20
20
|
#getListener(type) {
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (this.#listeners.has(type)) {
|
|
22
|
+
return this.#listeners.get(type);
|
|
23
|
+
}
|
|
24
|
+
let listener;
|
|
25
|
+
if (type === 'ping') {
|
|
26
|
+
listener = new PingListener();
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const isAlarm = type === 'alarm';
|
|
30
|
+
let eventEmitter;
|
|
31
|
+
if (type === 'task') {
|
|
32
|
+
eventEmitter = this.#restApi.xoApp.tasks;
|
|
24
33
|
}
|
|
25
34
|
else {
|
|
26
|
-
const isAlarm = type === 'alarm';
|
|
27
35
|
// alarm is purely XO-related; it doesn't exist at the XAPI level.
|
|
28
36
|
// alarm is a message with parsed values. So, in the case of an alarm listener, it listens for message collection.
|
|
29
|
-
|
|
30
|
-
this.#listeners.set(type, new XapiXoListener(type, ee, isAlarm ? this.#alarmService : undefined));
|
|
37
|
+
eventEmitter = this.#restApi.xoApp.objects.allIndexes.type.getEventEmitterByType(isAlarm ? 'message' : type);
|
|
31
38
|
}
|
|
39
|
+
listener = new XoListener(type, eventEmitter, isAlarm ? this.#alarmService : undefined);
|
|
32
40
|
}
|
|
33
|
-
|
|
41
|
+
this.#listeners.set(type, listener);
|
|
42
|
+
return listener;
|
|
34
43
|
}
|
|
35
44
|
createSseSubscriber(res) {
|
|
36
45
|
const subscriber = new Subscriber(res, this.#subscriberManager);
|
|
@@ -27,7 +27,6 @@ export const pool = {
|
|
|
27
27
|
tags: [],
|
|
28
28
|
name_description: 'Main Lyon Lab',
|
|
29
29
|
name_label: 'XO Lab',
|
|
30
|
-
xosanPackInstallationTime: null,
|
|
31
30
|
otherConfig: {
|
|
32
31
|
'xo:clientInfo:v9sc05bvrh': '{"lastConnected":1744102763392,"networkInterfaces":{"wlp58s0":[{"address":"192.168.1.22","netmask":"255.255.255.0","family":"IPv4","mac":"be:7b:03:70:e6:fe","internal":false,"cidr":"192.168.1.22/24"},{"address":"2a01:cb15:8411:4700:4aff:d5e9:6604:f90b","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"be:7b:03:70:e6:fe","internal":false,"cidr":"2a01:cb15:8411:4700:4aff:d5e9:6604:f90b/64","scopeid":0},{"address":"fe80::1d04:d88d:50de:799a","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"be:7b:03:70:e6:fe","internal":false,"cidr":"fe80::1d04:d88d:50de:799a/64","scopeid":2}],"wg-grenoble":[{"address":"10.200.205.115","netmask":"255.255.255.0","family":"IPv4","mac":"00:00:00:00:00:00","internal":false,"cidr":"10.200.205.115/24"}],"wg-lyon":[{"address":"10.200.200.115","netmask":"255.255.255.0","family":"IPv4","mac":"00:00:00:00:00:00","internal":false,"cidr":"10.200.200.115/24"}]}}',
|
|
33
32
|
'xo:clientInfo:218b43e8-5622-4d81-adce-69be4252c4de': '{"lastConnected":1744102538271,"networkInterfaces":{"wlp0s20f3":[{"address":"10.234.213.181","netmask":"255.255.255.0","family":"IPv4","mac":"6a:8e:98:da:15:36","internal":false,"cidr":"10.234.213.181/24"},{"address":"2a0d:e487:319f:7520:16da:8a1a:c6fb:7fc3","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"6a:8e:98:da:15:36","internal":false,"cidr":"2a0d:e487:319f:7520:16da:8a1a:c6fb:7fc3/64","scopeid":0},{"address":"fe80::9400:57c5:e2d:94ff","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"6a:8e:98:da:15:36","internal":false,"cidr":"fe80::9400:57c5:e2d:94ff/64","scopeid":2}],"wg1":[{"address":"10.200.205.81","netmask":"255.255.255.0","family":"IPv4","mac":"00:00:00:00:00:00","internal":false,"cidr":"10.200.205.81/24"}],"wg0":[{"address":"10.200.200.81","netmask":"255.255.255.0","family":"IPv4","mac":"00:00:00:00:00:00","internal":false,"cidr":"10.200.200.81/24"}]}}',
|
|
@@ -300,12 +300,12 @@ const models = {
|
|
|
300
300
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
301
301
|
"XoTask": {
|
|
302
302
|
"dataType": "refAlias",
|
|
303
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "warnings": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "updatedAt": { "dataType": "double" }, "tasks": { "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "start": { "dataType": "double", "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "string" }, "type": { "dataType": "string" }, "progress": { "dataType": "double" }, "params": { "ref": "Record_string.unknown_" }, "objectId": { "dataType": "string" }, "name": { "dataType": "string" }, "method": { "dataType": "string" } }, "additionalProperties": { "dataType": "union", "subSchemas": [{ "dataType": "any" }, { "dataType": "undefined" }] }, "required": true }, "infos": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "id": { "ref": "Branded_task_", "required": true }, "end": { "dataType": "double" }, "data": { "ref": "Record_string.string_" }, "abortionRequestedAt": { "dataType": "double" } }, "validators": {} },
|
|
303
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "warnings": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "updatedAt": { "dataType": "double" }, "tasks": { "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "start": { "dataType": "double", "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "string" }, "type": { "dataType": "string" }, "progress": { "dataType": "double" }, "params": { "ref": "Record_string.unknown_" }, "objectId": { "dataType": "string" }, "name": { "dataType": "string" }, "method": { "dataType": "string" } }, "additionalProperties": { "dataType": "union", "subSchemas": [{ "dataType": "any" }, { "dataType": "undefined" }] }, "required": true }, "progress": { "dataType": "double" }, "infos": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "id": { "ref": "Branded_task_", "required": true }, "end": { "dataType": "double" }, "data": { "ref": "Record_string.string_" }, "abortionRequestedAt": { "dataType": "double" } }, "validators": {} },
|
|
304
304
|
},
|
|
305
305
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
306
306
|
"Partial_Unbrand_XoTask__": {
|
|
307
307
|
"dataType": "refAlias",
|
|
308
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "properties": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" } }, { "dataType": "undefined" }] }, "result": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "start": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }, { "dataType": "undefined" }] }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
|
|
308
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "properties": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" } }, { "dataType": "undefined" }] }, "result": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "start": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }, { "dataType": "undefined" }] }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
|
|
309
309
|
},
|
|
310
310
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
311
311
|
"WithHref_Partial_Unbrand_XoTask___": {
|
|
@@ -566,7 +566,7 @@ const models = {
|
|
|
566
566
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
567
567
|
"Unbrand_XoTask_": {
|
|
568
568
|
"dataType": "refAlias",
|
|
569
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "string", "required": true }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" }, "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "start": { "dataType": "double", "required": true }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
|
|
569
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "string", "required": true }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" }, "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "start": { "dataType": "double", "required": true }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
|
|
570
570
|
},
|
|
571
571
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
572
572
|
"Record_string.STORAGE_OPERATIONS_": {
|
|
@@ -720,7 +720,7 @@ const models = {
|
|
|
720
720
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
721
721
|
"Partial_Unbrand_XoPool__": {
|
|
722
722
|
"dataType": "refAlias",
|
|
723
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "$poolId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "_xapiRef": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "uuid": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "auto_poweron": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "cpus": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "sockets": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "cores": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] } } }, { "dataType": "undefined" }] }, "crashDumpSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "current_operations": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.POOL_ALLOWED_OPERATIONS_" }, { "dataType": "undefined" }] }, "default_SR": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "HA_enabled": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "haSrs": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "master": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "migrationCompression": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "otherConfig": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "platform_version": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "suspendSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "tags": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["pool"] }, { "dataType": "undefined" }] }, "vtpmSupported": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "
|
|
723
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "$poolId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "_xapiRef": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "uuid": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "auto_poweron": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "cpus": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "sockets": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "cores": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] } } }, { "dataType": "undefined" }] }, "crashDumpSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "current_operations": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.POOL_ALLOWED_OPERATIONS_" }, { "dataType": "undefined" }] }, "default_SR": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "HA_enabled": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "haSrs": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "master": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "migrationCompression": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "otherConfig": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "platform_version": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "suspendSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "tags": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["pool"] }, { "dataType": "undefined" }] }, "vtpmSupported": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "zstdSupported": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] } }, "validators": {} },
|
|
724
724
|
},
|
|
725
725
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
726
726
|
"WithHref_Partial_Unbrand_XoPool___": {
|
|
@@ -735,7 +735,7 @@ const models = {
|
|
|
735
735
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
736
736
|
"Unbrand_XoPool_": {
|
|
737
737
|
"dataType": "refAlias",
|
|
738
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "auto_poweron": { "dataType": "boolean", "required": true }, "cpus": { "dataType": "nestedObjectLiteral", "nestedProperties": { "sockets": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "cores": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] } }, "required": true }, "crashDumpSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "current_operations": { "ref": "Record_string.POOL_ALLOWED_OPERATIONS_", "required": true }, "default_SR": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "HA_enabled": { "dataType": "boolean", "required": true }, "haSrs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "id": { "dataType": "string", "required": true }, "master": { "dataType": "string", "required": true }, "migrationCompression": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "otherConfig": { "ref": "Record_string.string_", "required": true }, "platform_version": { "dataType": "string", "required": true }, "suspendSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "type": { "dataType": "enum", "enums": ["pool"], "required": true }, "vtpmSupported": { "dataType": "boolean", "required": true }, "
|
|
738
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "auto_poweron": { "dataType": "boolean", "required": true }, "cpus": { "dataType": "nestedObjectLiteral", "nestedProperties": { "sockets": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "cores": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] } }, "required": true }, "crashDumpSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "current_operations": { "ref": "Record_string.POOL_ALLOWED_OPERATIONS_", "required": true }, "default_SR": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "HA_enabled": { "dataType": "boolean", "required": true }, "haSrs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "id": { "dataType": "string", "required": true }, "master": { "dataType": "string", "required": true }, "migrationCompression": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "otherConfig": { "ref": "Record_string.string_", "required": true }, "platform_version": { "dataType": "string", "required": true }, "suspendSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "type": { "dataType": "enum", "enums": ["pool"], "required": true }, "vtpmSupported": { "dataType": "boolean", "required": true }, "zstdSupported": { "dataType": "boolean", "required": true } }, "validators": {} },
|
|
739
739
|
},
|
|
740
740
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
741
741
|
"CreateActionReturnType__id-Unbrand_XoNetwork__91_id_93___": {
|
|
@@ -1018,9 +1018,9 @@ const models = {
|
|
|
1018
1018
|
"additionalProperties": false,
|
|
1019
1019
|
},
|
|
1020
1020
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
1021
|
-
"
|
|
1021
|
+
"XoListenerType": {
|
|
1022
1022
|
"dataType": "refAlias",
|
|
1023
|
-
"type": { "dataType": "union", "subSchemas": [{ "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["pool"] }, { "dataType": "enum", "enums": ["VBD"] }, { "dataType": "enum", "enums": ["host"] }, { "dataType": "enum", "enums": ["VIF"] }, { "dataType": "enum", "enums": ["VTPM"] }, { "dataType": "enum", "enums": ["VM"] }, { "dataType": "enum", "enums": ["VM-snapshot"] }, { "dataType": "enum", "enums": ["SR"] }, { "dataType": "enum", "enums": ["message"] }, { "dataType": "enum", "enums": ["vgpu"] }, { "dataType": "enum", "enums": ["gpuGroup"] }, { "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["PBD"] }, { "dataType": "enum", "enums": ["PCI"] }, { "dataType": "enum", "enums": ["PGPU"] }, { "dataType": "enum", "enums": ["PIF"] }, { "dataType": "enum", "enums": ["VDI"] }, { "dataType": "enum", "enums": ["VDI-snapshot"] }, { "dataType": "enum", "enums": ["VDI-unmanaged"] }, { "dataType": "enum", "enums": ["vgpuType"] }, { "dataType": "enum", "enums": ["VM-controller"] }, { "dataType": "enum", "enums": ["VM-template"] }, { "dataType": "enum", "enums": ["SM"] }] }, { "dataType": "enum", "enums": ["alarm"] }], "validators": {} },
|
|
1023
|
+
"type": { "dataType": "union", "subSchemas": [{ "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["pool"] }, { "dataType": "enum", "enums": ["VBD"] }, { "dataType": "enum", "enums": ["host"] }, { "dataType": "enum", "enums": ["VIF"] }, { "dataType": "enum", "enums": ["VTPM"] }, { "dataType": "enum", "enums": ["VM"] }, { "dataType": "enum", "enums": ["VM-snapshot"] }, { "dataType": "enum", "enums": ["SR"] }, { "dataType": "enum", "enums": ["message"] }, { "dataType": "enum", "enums": ["vgpu"] }, { "dataType": "enum", "enums": ["gpuGroup"] }, { "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["PBD"] }, { "dataType": "enum", "enums": ["PCI"] }, { "dataType": "enum", "enums": ["PGPU"] }, { "dataType": "enum", "enums": ["PIF"] }, { "dataType": "enum", "enums": ["VDI"] }, { "dataType": "enum", "enums": ["VDI-snapshot"] }, { "dataType": "enum", "enums": ["VDI-unmanaged"] }, { "dataType": "enum", "enums": ["vgpuType"] }, { "dataType": "enum", "enums": ["VM-controller"] }, { "dataType": "enum", "enums": ["VM-template"] }, { "dataType": "enum", "enums": ["SM"] }] }, { "dataType": "enum", "enums": ["alarm"] }, { "dataType": "enum", "enums": ["task"] }], "validators": {} },
|
|
1024
1024
|
},
|
|
1025
1025
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
1026
1026
|
"Partial_Unbrand_XoBackupRepository__": {
|
|
@@ -6638,7 +6638,7 @@ export function RegisterRoutes(app) {
|
|
|
6638
6638
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
6639
6639
|
const argsEventController_addSubscription = {
|
|
6640
6640
|
id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
|
|
6641
|
-
body: { "in": "body", "name": "body", "required": true, "dataType": "nestedObjectLiteral", "nestedProperties": { "fields": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["*"] }, { "dataType": "array", "array": { "dataType": "string" } }] }, "collection": { "ref": "
|
|
6641
|
+
body: { "in": "body", "name": "body", "required": true, "dataType": "nestedObjectLiteral", "nestedProperties": { "fields": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["*"] }, { "dataType": "array", "array": { "dataType": "string" } }] }, "collection": { "ref": "XoListenerType", "required": true } } },
|
|
6642
6642
|
};
|
|
6643
6643
|
app.post('/rest/v0/events/:id/subscriptions', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(EventController)), ...(fetchMiddlewares(EventController.prototype.addSubscription)), async function EventController_addSubscription(request, response, next) {
|
|
6644
6644
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
@@ -6666,7 +6666,7 @@ export function RegisterRoutes(app) {
|
|
|
6666
6666
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
6667
6667
|
const argsEventController_removeSubscription = {
|
|
6668
6668
|
id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
|
|
6669
|
-
subscriptionId: { "in": "path", "name": "subscriptionId", "required": true, "ref": "
|
|
6669
|
+
subscriptionId: { "in": "path", "name": "subscriptionId", "required": true, "ref": "XoListenerType" },
|
|
6670
6670
|
};
|
|
6671
6671
|
app.delete('/rest/v0/events/:id/subscriptions/:subscriptionId', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(EventController)), ...(fetchMiddlewares(EventController.prototype.removeSubscription)), async function EventController_removeSubscription(request, response, next) {
|
|
6672
6672
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
@@ -36,7 +36,7 @@ export class RestApi {
|
|
|
36
36
|
if (filter !== undefined && typeof filter === 'string') {
|
|
37
37
|
filter = safeParseComplexMatcher(filter).createPredicate();
|
|
38
38
|
}
|
|
39
|
-
return this.#xoApp.getObjectsByType(type, { filter, ...opts });
|
|
39
|
+
return this.#xoApp.getObjectsByType(type, { filter, ...opts }) ?? {};
|
|
40
40
|
}
|
|
41
41
|
getXapiObject(maybeId, type) {
|
|
42
42
|
return this.#xoApp.getXapiObject(maybeId, type);
|
|
@@ -63,8 +63,8 @@ let TaskController = class TaskController extends XoController {
|
|
|
63
63
|
stream.write(['update', task]);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function remove(
|
|
67
|
-
stream.write(['remove', { id:
|
|
66
|
+
function remove(task) {
|
|
67
|
+
stream.write(['remove', { id: task.id }]);
|
|
68
68
|
}
|
|
69
69
|
this.restApi.tasks.on('update', update).on('remove', remove);
|
|
70
70
|
return stream;
|
|
@@ -400,6 +400,7 @@ let VmController = class VmController extends XapiXoController {
|
|
|
400
400
|
* @example id "613f541c-4bed-fc77-7ca8-2db6b68f079c"
|
|
401
401
|
*/
|
|
402
402
|
async getVmDashboard(req, id, ndjson) {
|
|
403
|
+
const vm = this.getObject(id);
|
|
403
404
|
const stream = ndjson ? new PassThrough() : undefined;
|
|
404
405
|
const isStream = stream !== undefined;
|
|
405
406
|
if (isStream) {
|
|
@@ -408,7 +409,7 @@ let VmController = class VmController extends XapiXoController {
|
|
|
408
409
|
stream.pipe(res);
|
|
409
410
|
}
|
|
410
411
|
try {
|
|
411
|
-
const dashboard = await this.#vmService.getVmDashboard(id, { stream });
|
|
412
|
+
const dashboard = await this.#vmService.getVmDashboard(vm.id, { stream });
|
|
412
413
|
if (!isStream) {
|
|
413
414
|
return dashboard;
|
|
414
415
|
}
|
package/dist/vms/vm.service.mjs
CHANGED
|
@@ -153,8 +153,8 @@ export class VmService {
|
|
|
153
153
|
size: memory.size,
|
|
154
154
|
},
|
|
155
155
|
creation: {
|
|
156
|
-
date: creation
|
|
157
|
-
user: creation
|
|
156
|
+
date: creation?.date,
|
|
157
|
+
user: creation?.user,
|
|
158
158
|
},
|
|
159
159
|
$pool,
|
|
160
160
|
virtualizationMode,
|
|
@@ -271,6 +271,7 @@ export class VmService {
|
|
|
271
271
|
const brIds = (await this.#restApi.xoApp.getAllRemotes()).map(br => br.id);
|
|
272
272
|
const backupArchivesByVmByBr = await this.#restApi.xoApp.listVmBackupsNg(brIds, { vmId: vm.id });
|
|
273
273
|
return Object.values(backupArchivesByVmByBr)
|
|
274
|
+
.filter(backupArchiveByVm => backupArchiveByVm !== undefined)
|
|
274
275
|
.flatMap(backupArchiveByVm => backupArchiveByVm[vm.id])
|
|
275
276
|
.sort((a, b) => b.timestamp - a.timestamp)
|
|
276
277
|
.splice(0, 3)
|
|
@@ -2235,6 +2235,10 @@
|
|
|
2235
2235
|
"additionalProperties": {},
|
|
2236
2236
|
"type": "object"
|
|
2237
2237
|
},
|
|
2238
|
+
"progress": {
|
|
2239
|
+
"type": "number",
|
|
2240
|
+
"format": "double"
|
|
2241
|
+
},
|
|
2238
2242
|
"infos": {
|
|
2239
2243
|
"items": {
|
|
2240
2244
|
"properties": {
|
|
@@ -2307,6 +2311,10 @@
|
|
|
2307
2311
|
},
|
|
2308
2312
|
"type": "array"
|
|
2309
2313
|
},
|
|
2314
|
+
"progress": {
|
|
2315
|
+
"type": "number",
|
|
2316
|
+
"format": "double"
|
|
2317
|
+
},
|
|
2310
2318
|
"properties": {
|
|
2311
2319
|
"properties": {
|
|
2312
2320
|
"userId": {
|
|
@@ -6255,6 +6263,10 @@
|
|
|
6255
6263
|
},
|
|
6256
6264
|
"type": "array"
|
|
6257
6265
|
},
|
|
6266
|
+
"progress": {
|
|
6267
|
+
"type": "number",
|
|
6268
|
+
"format": "double"
|
|
6269
|
+
},
|
|
6258
6270
|
"properties": {
|
|
6259
6271
|
"properties": {
|
|
6260
6272
|
"userId": {
|
|
@@ -7398,11 +7410,6 @@
|
|
|
7398
7410
|
"vtpmSupported": {
|
|
7399
7411
|
"type": "boolean"
|
|
7400
7412
|
},
|
|
7401
|
-
"xosanPackInstallationTime": {
|
|
7402
|
-
"type": "number",
|
|
7403
|
-
"format": "double",
|
|
7404
|
-
"nullable": true
|
|
7405
|
-
},
|
|
7406
7413
|
"zstdSupported": {
|
|
7407
7414
|
"type": "boolean"
|
|
7408
7415
|
}
|
|
@@ -7536,11 +7543,6 @@
|
|
|
7536
7543
|
"vtpmSupported": {
|
|
7537
7544
|
"type": "boolean"
|
|
7538
7545
|
},
|
|
7539
|
-
"xosanPackInstallationTime": {
|
|
7540
|
-
"type": "number",
|
|
7541
|
-
"format": "double",
|
|
7542
|
-
"nullable": true
|
|
7543
|
-
},
|
|
7544
7546
|
"zstdSupported": {
|
|
7545
7547
|
"type": "boolean"
|
|
7546
7548
|
}
|
|
@@ -7564,7 +7566,6 @@
|
|
|
7564
7566
|
"tags",
|
|
7565
7567
|
"type",
|
|
7566
7568
|
"vtpmSupported",
|
|
7567
|
-
"xosanPackInstallationTime",
|
|
7568
7569
|
"zstdSupported"
|
|
7569
7570
|
],
|
|
7570
7571
|
"type": "object"
|
|
@@ -10593,7 +10594,7 @@
|
|
|
10593
10594
|
"type": "object",
|
|
10594
10595
|
"additionalProperties": false
|
|
10595
10596
|
},
|
|
10596
|
-
"
|
|
10597
|
+
"XoListenerType": {
|
|
10597
10598
|
"type": "string",
|
|
10598
10599
|
"enum": [
|
|
10599
10600
|
"pool",
|
|
@@ -10619,7 +10620,8 @@
|
|
|
10619
10620
|
"VM-controller",
|
|
10620
10621
|
"VM-template",
|
|
10621
10622
|
"SM",
|
|
10622
|
-
"alarm"
|
|
10623
|
+
"alarm",
|
|
10624
|
+
"task"
|
|
10623
10625
|
]
|
|
10624
10626
|
},
|
|
10625
10627
|
"Partial_Unbrand_XoBackupRepository__": {
|
|
@@ -12021,7 +12023,7 @@
|
|
|
12021
12023
|
},
|
|
12022
12024
|
"info": {
|
|
12023
12025
|
"title": "@xen-orchestra/rest-api",
|
|
12024
|
-
"version": "0.
|
|
12026
|
+
"version": "0.22.0",
|
|
12025
12027
|
"description": "REST API to manage your XOA",
|
|
12026
12028
|
"license": {
|
|
12027
12029
|
"name": "AGPL-3.0-or-later"
|
|
@@ -23581,7 +23583,6 @@
|
|
|
23581
23583
|
"tags": [],
|
|
23582
23584
|
"name_description": "Main Lyon Lab",
|
|
23583
23585
|
"name_label": "XO Lab",
|
|
23584
|
-
"xosanPackInstallationTime": null,
|
|
23585
23586
|
"otherConfig": {
|
|
23586
23587
|
"xo:clientInfo:v9sc05bvrh": "{\"lastConnected\":1744102763392,\"networkInterfaces\":{\"wlp58s0\":[{\"address\":\"192.168.1.22\",\"netmask\":\"255.255.255.0\",\"family\":\"IPv4\",\"mac\":\"be:7b:03:70:e6:fe\",\"internal\":false,\"cidr\":\"192.168.1.22/24\"},{\"address\":\"2a01:cb15:8411:4700:4aff:d5e9:6604:f90b\",\"netmask\":\"ffff:ffff:ffff:ffff::\",\"family\":\"IPv6\",\"mac\":\"be:7b:03:70:e6:fe\",\"internal\":false,\"cidr\":\"2a01:cb15:8411:4700:4aff:d5e9:6604:f90b/64\",\"scopeid\":0},{\"address\":\"fe80::1d04:d88d:50de:799a\",\"netmask\":\"ffff:ffff:ffff:ffff::\",\"family\":\"IPv6\",\"mac\":\"be:7b:03:70:e6:fe\",\"internal\":false,\"cidr\":\"fe80::1d04:d88d:50de:799a/64\",\"scopeid\":2}],\"wg-grenoble\":[{\"address\":\"10.200.205.115\",\"netmask\":\"255.255.255.0\",\"family\":\"IPv4\",\"mac\":\"00:00:00:00:00:00\",\"internal\":false,\"cidr\":\"10.200.205.115/24\"}],\"wg-lyon\":[{\"address\":\"10.200.200.115\",\"netmask\":\"255.255.255.0\",\"family\":\"IPv4\",\"mac\":\"00:00:00:00:00:00\",\"internal\":false,\"cidr\":\"10.200.200.115/24\"}]}}",
|
|
23587
23588
|
"xo:clientInfo:218b43e8-5622-4d81-adce-69be4252c4de": "{\"lastConnected\":1744102538271,\"networkInterfaces\":{\"wlp0s20f3\":[{\"address\":\"10.234.213.181\",\"netmask\":\"255.255.255.0\",\"family\":\"IPv4\",\"mac\":\"6a:8e:98:da:15:36\",\"internal\":false,\"cidr\":\"10.234.213.181/24\"},{\"address\":\"2a0d:e487:319f:7520:16da:8a1a:c6fb:7fc3\",\"netmask\":\"ffff:ffff:ffff:ffff::\",\"family\":\"IPv6\",\"mac\":\"6a:8e:98:da:15:36\",\"internal\":false,\"cidr\":\"2a0d:e487:319f:7520:16da:8a1a:c6fb:7fc3/64\",\"scopeid\":0},{\"address\":\"fe80::9400:57c5:e2d:94ff\",\"netmask\":\"ffff:ffff:ffff:ffff::\",\"family\":\"IPv6\",\"mac\":\"6a:8e:98:da:15:36\",\"internal\":false,\"cidr\":\"fe80::9400:57c5:e2d:94ff/64\",\"scopeid\":2}],\"wg1\":[{\"address\":\"10.200.205.81\",\"netmask\":\"255.255.255.0\",\"family\":\"IPv4\",\"mac\":\"00:00:00:00:00:00\",\"internal\":false,\"cidr\":\"10.200.205.81/24\"}],\"wg0\":[{\"address\":\"10.200.200.81\",\"netmask\":\"255.255.255.0\",\"family\":\"IPv4\",\"mac\":\"00:00:00:00:00:00\",\"internal\":false,\"cidr\":\"10.200.200.81/24\"}]}}",
|
|
@@ -36583,7 +36584,7 @@
|
|
|
36583
36584
|
]
|
|
36584
36585
|
},
|
|
36585
36586
|
"collection": {
|
|
36586
|
-
"$ref": "#/components/schemas/
|
|
36587
|
+
"$ref": "#/components/schemas/XoListenerType"
|
|
36587
36588
|
}
|
|
36588
36589
|
},
|
|
36589
36590
|
"required": [
|
|
@@ -36644,7 +36645,7 @@
|
|
|
36644
36645
|
"name": "subscriptionId",
|
|
36645
36646
|
"required": true,
|
|
36646
36647
|
"schema": {
|
|
36647
|
-
"$ref": "#/components/schemas/
|
|
36648
|
+
"$ref": "#/components/schemas/XoListenerType"
|
|
36648
36649
|
}
|
|
36649
36650
|
}
|
|
36650
36651
|
]
|
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.
|
|
9
|
+
"version": "0.22.0",
|
|
10
10
|
"description": "REST API to manage your XOA",
|
|
11
11
|
"license": "AGPL-3.0-or-later",
|
|
12
12
|
"private": false,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@vates/async-each": "^1.0.1",
|
|
37
37
|
"@vates/task": "^0.6.1",
|
|
38
|
-
"@vates/types": "^1.
|
|
38
|
+
"@vates/types": "^1.16.0",
|
|
39
39
|
"@xen-orchestra/backups": "^0.67.1",
|
|
40
40
|
"@xen-orchestra/log": "^0.7.1",
|
|
41
41
|
"@xen-orchestra/xapi": "^8.6.1",
|