@xen-orchestra/rest-api 0.28.2 → 0.29.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/abstract-classes/base-controller.mjs +10 -0
- package/dist/abstract-classes/listener.mjs +8 -3
- package/dist/alarms/alarm.controller.mjs +3 -2
- package/dist/backup-archives/backup-archive.controller.mjs +3 -2
- package/dist/backup-jobs/backup-job.controller.mjs +15 -10
- package/dist/backup-logs/backup-log.controller.mjs +3 -2
- package/dist/backup-repositories/backup-repositories.controller.mjs +3 -2
- package/dist/events/event.class.mjs +12 -9
- package/dist/events/event.service.mjs +2 -3
- package/dist/groups/group.controller.mjs +9 -6
- package/dist/helpers/markdown.helper.mjs +20 -0
- package/dist/helpers/object-wrapper.helper.mjs +3 -3
- package/dist/hosts/host.controller.mjs +12 -8
- package/dist/messages/message.controller.mjs +3 -2
- package/dist/networks/network.controller.mjs +12 -8
- package/dist/open-api/routes/routes.js +182 -42
- package/dist/pbds/pbd.controller.mjs +3 -2
- package/dist/pcis/pci.controller.mjs +3 -2
- package/dist/pgpus/pgpu.controller.mjs +3 -2
- package/dist/pifs/pif.controller.mjs +12 -8
- package/dist/pools/pool.controller.mjs +12 -8
- package/dist/proxies/proxy.controller.mjs +3 -2
- package/dist/restore-logs/restore-log.controller.mjs +6 -4
- package/dist/schedules/schedule.controller.mjs +3 -2
- package/dist/servers/server.controller.mjs +6 -4
- package/dist/sms/sm.controller.mjs +3 -2
- package/dist/srs/sr.controller.mjs +12 -8
- package/dist/tasks/task.controller.mjs +3 -2
- package/dist/users/user.controller.mjs +9 -6
- package/dist/vbds/vbd.controller.mjs +12 -8
- package/dist/vdi-snapshots/vdi-snapshot.controller.mjs +12 -8
- package/dist/vdis/vdi.controller.mjs +12 -8
- package/dist/vifs/vif.controller.mjs +76 -10
- package/dist/vm-controller/vm-controller.controller.mjs +15 -10
- package/dist/vm-snapshots/vm-snapshot.controller.mjs +15 -10
- package/dist/vm-templates/vm-template.controller.mjs +15 -10
- package/dist/vms/vm.controller.mjs +18 -12
- package/open-api/spec/swagger.json +1164 -231
- package/package.json +11 -11
|
@@ -24,7 +24,7 @@ let PbdController = class PbdController extends XapiXoController {
|
|
|
24
24
|
* @example filter "attached?"
|
|
25
25
|
* @example limit 42
|
|
26
26
|
*/
|
|
27
|
-
getPbds(req, fields, ndjson, filter, limit) {
|
|
27
|
+
getPbds(req, fields, ndjson, markdown, filter, limit) {
|
|
28
28
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -78,7 +78,8 @@ __decorate([
|
|
|
78
78
|
__param(1, Query()),
|
|
79
79
|
__param(2, Query()),
|
|
80
80
|
__param(3, Query()),
|
|
81
|
-
__param(4, Query())
|
|
81
|
+
__param(4, Query()),
|
|
82
|
+
__param(5, Query())
|
|
82
83
|
], PbdController.prototype, "getPbds", null);
|
|
83
84
|
__decorate([
|
|
84
85
|
Example(pbd),
|
|
@@ -23,7 +23,7 @@ let PciController = class PciController extends XapiXoController {
|
|
|
23
23
|
* @example filter "class_name:Non-Volatile memory controller"
|
|
24
24
|
* @example limit 42
|
|
25
25
|
*/
|
|
26
|
-
getPcis(req, fields, ndjson, filter, limit) {
|
|
26
|
+
getPcis(req, fields, ndjson, markdown, filter, limit) {
|
|
27
27
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -41,7 +41,8 @@ __decorate([
|
|
|
41
41
|
__param(1, Query()),
|
|
42
42
|
__param(2, Query()),
|
|
43
43
|
__param(3, Query()),
|
|
44
|
-
__param(4, Query())
|
|
44
|
+
__param(4, Query()),
|
|
45
|
+
__param(5, Query())
|
|
45
46
|
], PciController.prototype, "getPcis", null);
|
|
46
47
|
__decorate([
|
|
47
48
|
Example(pci),
|
|
@@ -23,7 +23,7 @@ let PgpuController = class PgpuController extends XapiXoController {
|
|
|
23
23
|
* @example filter "dom0Access:enabled"
|
|
24
24
|
* @example limit 42
|
|
25
25
|
*/
|
|
26
|
-
getPgpus(req, fields, ndjson, filter, limit) {
|
|
26
|
+
getPgpus(req, fields, ndjson, markdown, filter, limit) {
|
|
27
27
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -41,7 +41,8 @@ __decorate([
|
|
|
41
41
|
__param(1, Query()),
|
|
42
42
|
__param(2, Query()),
|
|
43
43
|
__param(3, Query()),
|
|
44
|
-
__param(4, Query())
|
|
44
|
+
__param(4, Query()),
|
|
45
|
+
__param(5, Query())
|
|
45
46
|
], PgpuController.prototype, "getPgpus", null);
|
|
46
47
|
__decorate([
|
|
47
48
|
Example(pgpu),
|
|
@@ -30,7 +30,7 @@ let PifController = class PifController extends XapiXoController {
|
|
|
30
30
|
* @example filter "attached?"
|
|
31
31
|
* @example limit 42
|
|
32
32
|
*/
|
|
33
|
-
getPifs(req, fields, ndjson, filter, limit) {
|
|
33
|
+
getPifs(req, fields, ndjson, markdown, filter, limit) {
|
|
34
34
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -45,7 +45,7 @@ let PifController = class PifController extends XapiXoController {
|
|
|
45
45
|
* @example filter "time:>1747053793"
|
|
46
46
|
* @example limit 42
|
|
47
47
|
*/
|
|
48
|
-
getPifAlarms(req, id, fields, ndjson, filter, limit) {
|
|
48
|
+
getPifAlarms(req, id, fields, ndjson, markdown, filter, limit) {
|
|
49
49
|
const pif = this.getObject(id);
|
|
50
50
|
const alarms = this.#alarmService.getAlarms({
|
|
51
51
|
filter: `${escapeUnsafeComplexMatcher(filter) ?? ''} object:uuid:${pif.uuid}`,
|
|
@@ -59,7 +59,7 @@ let PifController = class PifController extends XapiXoController {
|
|
|
59
59
|
* @example filter "name:VM_STARTED"
|
|
60
60
|
* @example limit 42
|
|
61
61
|
*/
|
|
62
|
-
getPifMessages(req, id, fields, ndjson, filter, limit) {
|
|
62
|
+
getPifMessages(req, id, fields, ndjson, markdown, filter, limit) {
|
|
63
63
|
const messages = this.getMessagesForObject(id, { filter, limit });
|
|
64
64
|
return this.sendObjects(Object.values(messages), req, 'messages');
|
|
65
65
|
}
|
|
@@ -69,7 +69,7 @@ let PifController = class PifController extends XapiXoController {
|
|
|
69
69
|
* @example filter "status:failure"
|
|
70
70
|
* @example limit 42
|
|
71
71
|
*/
|
|
72
|
-
async getPifTasks(req, id, fields, ndjson, filter, limit) {
|
|
72
|
+
async getPifTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
73
73
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
74
74
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
75
75
|
}
|
|
@@ -82,7 +82,8 @@ __decorate([
|
|
|
82
82
|
__param(1, Query()),
|
|
83
83
|
__param(2, Query()),
|
|
84
84
|
__param(3, Query()),
|
|
85
|
-
__param(4, Query())
|
|
85
|
+
__param(4, Query()),
|
|
86
|
+
__param(5, Query())
|
|
86
87
|
], PifController.prototype, "getPifs", null);
|
|
87
88
|
__decorate([
|
|
88
89
|
Example(pif),
|
|
@@ -100,7 +101,8 @@ __decorate([
|
|
|
100
101
|
__param(2, Query()),
|
|
101
102
|
__param(3, Query()),
|
|
102
103
|
__param(4, Query()),
|
|
103
|
-
__param(5, Query())
|
|
104
|
+
__param(5, Query()),
|
|
105
|
+
__param(6, Query())
|
|
104
106
|
], PifController.prototype, "getPifAlarms", null);
|
|
105
107
|
__decorate([
|
|
106
108
|
Example(messageIds),
|
|
@@ -113,7 +115,8 @@ __decorate([
|
|
|
113
115
|
__param(2, Query()),
|
|
114
116
|
__param(3, Query()),
|
|
115
117
|
__param(4, Query()),
|
|
116
|
-
__param(5, Query())
|
|
118
|
+
__param(5, Query()),
|
|
119
|
+
__param(6, Query())
|
|
117
120
|
], PifController.prototype, "getPifMessages", null);
|
|
118
121
|
__decorate([
|
|
119
122
|
Example(taskIds),
|
|
@@ -126,7 +129,8 @@ __decorate([
|
|
|
126
129
|
__param(2, Query()),
|
|
127
130
|
__param(3, Query()),
|
|
128
131
|
__param(4, Query()),
|
|
129
|
-
__param(5, Query())
|
|
132
|
+
__param(5, Query()),
|
|
133
|
+
__param(6, Query())
|
|
130
134
|
], PifController.prototype, "getPifTasks", null);
|
|
131
135
|
PifController = __decorate([
|
|
132
136
|
Route('pifs'),
|
|
@@ -45,7 +45,7 @@ let PoolController = class PoolController extends XapiXoController {
|
|
|
45
45
|
* @example filter "auto_poweron?"
|
|
46
46
|
* @example limit 42
|
|
47
47
|
*/
|
|
48
|
-
getPools(req, fields, ndjson, filter, limit) {
|
|
48
|
+
getPools(req, fields, ndjson, markdown, filter, limit) {
|
|
49
49
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -274,7 +274,7 @@ let PoolController = class PoolController extends XapiXoController {
|
|
|
274
274
|
* @example filter "time:>1747053793"
|
|
275
275
|
* @example limit 42
|
|
276
276
|
*/
|
|
277
|
-
getPoolAlarms(req, id, fields, ndjson, filter, limit) {
|
|
277
|
+
getPoolAlarms(req, id, fields, ndjson, markdown, filter, limit) {
|
|
278
278
|
const pool = this.getObject(id);
|
|
279
279
|
const alarms = this.#alarmService.getAlarms({
|
|
280
280
|
filter: `${escapeUnsafeComplexMatcher(filter) ?? ''} object:uuid:${pool.uuid}`,
|
|
@@ -296,7 +296,7 @@ let PoolController = class PoolController extends XapiXoController {
|
|
|
296
296
|
* @example filter "name:IP_CONFIGURED_PIF_CAN_UNPLUG"
|
|
297
297
|
* @example limit 42
|
|
298
298
|
*/
|
|
299
|
-
getPoolMessages(req, id, fields, ndjson, filter, limit) {
|
|
299
|
+
getPoolMessages(req, id, fields, ndjson, markdown, filter, limit) {
|
|
300
300
|
const messages = this.getMessagesForObject(id, { filter, limit });
|
|
301
301
|
return this.sendObjects(Object.values(messages), req, 'messages');
|
|
302
302
|
}
|
|
@@ -321,7 +321,7 @@ let PoolController = class PoolController extends XapiXoController {
|
|
|
321
321
|
* @example filter "status:failure"
|
|
322
322
|
* @example limit 42
|
|
323
323
|
*/
|
|
324
|
-
async getPoolTasks(req, id, fields, ndjson, filter, limit) {
|
|
324
|
+
async getPoolTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
325
325
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
326
326
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
327
327
|
}
|
|
@@ -364,7 +364,8 @@ __decorate([
|
|
|
364
364
|
__param(1, Query()),
|
|
365
365
|
__param(2, Query()),
|
|
366
366
|
__param(3, Query()),
|
|
367
|
-
__param(4, Query())
|
|
367
|
+
__param(4, Query()),
|
|
368
|
+
__param(5, Query())
|
|
368
369
|
], PoolController.prototype, "getPools", null);
|
|
369
370
|
__decorate([
|
|
370
371
|
Example(pool),
|
|
@@ -498,7 +499,8 @@ __decorate([
|
|
|
498
499
|
__param(2, Query()),
|
|
499
500
|
__param(3, Query()),
|
|
500
501
|
__param(4, Query()),
|
|
501
|
-
__param(5, Query())
|
|
502
|
+
__param(5, Query()),
|
|
503
|
+
__param(6, Query())
|
|
502
504
|
], PoolController.prototype, "getPoolAlarms", null);
|
|
503
505
|
__decorate([
|
|
504
506
|
Example(poolMissingPatches),
|
|
@@ -518,7 +520,8 @@ __decorate([
|
|
|
518
520
|
__param(2, Query()),
|
|
519
521
|
__param(3, Query()),
|
|
520
522
|
__param(4, Query()),
|
|
521
|
-
__param(5, Query())
|
|
523
|
+
__param(5, Query()),
|
|
524
|
+
__param(6, Query())
|
|
522
525
|
], PoolController.prototype, "getPoolMessages", null);
|
|
523
526
|
__decorate([
|
|
524
527
|
Put('{id}/tags/{tag}'),
|
|
@@ -545,7 +548,8 @@ __decorate([
|
|
|
545
548
|
__param(2, Query()),
|
|
546
549
|
__param(3, Query()),
|
|
547
550
|
__param(4, Query()),
|
|
548
|
-
__param(5, Query())
|
|
551
|
+
__param(5, Query()),
|
|
552
|
+
__param(6, Query())
|
|
549
553
|
], PoolController.prototype, "getPoolTasks", null);
|
|
550
554
|
__decorate([
|
|
551
555
|
Example(taskLocation),
|
|
@@ -29,7 +29,7 @@ let ProxyController = class ProxyController extends XoController {
|
|
|
29
29
|
* @example filter "vmUuid?"
|
|
30
30
|
* @example limit 42
|
|
31
31
|
*/
|
|
32
|
-
async getProxies(req, fields, ndjson, filter, limit) {
|
|
32
|
+
async getProxies(req, fields, ndjson, markdown, filter, limit) {
|
|
33
33
|
const proxies = Object.values(await this.getObjects({ filter, limit }));
|
|
34
34
|
return this.sendObjects(proxies, req);
|
|
35
35
|
}
|
|
@@ -48,7 +48,8 @@ __decorate([
|
|
|
48
48
|
__param(1, Query()),
|
|
49
49
|
__param(2, Query()),
|
|
50
50
|
__param(3, Query()),
|
|
51
|
-
__param(4, Query())
|
|
51
|
+
__param(4, Query()),
|
|
52
|
+
__param(5, Query())
|
|
52
53
|
], ProxyController.prototype, "getProxies", null);
|
|
53
54
|
__decorate([
|
|
54
55
|
Example(proxy),
|
|
@@ -40,7 +40,7 @@ let RestoreLogController = class RestoreLogController extends XoController {
|
|
|
40
40
|
* @example filter "status:success"
|
|
41
41
|
* @example limit 42
|
|
42
42
|
*/
|
|
43
|
-
async getRestoreLogs(req, fields, ndjson, filter, limit) {
|
|
43
|
+
async getRestoreLogs(req, fields, ndjson, markdown, filter, limit) {
|
|
44
44
|
const restoreLogs = await this.getObjects({ filter, limit });
|
|
45
45
|
return this.sendObjects(Object.values(restoreLogs), req);
|
|
46
46
|
}
|
|
@@ -59,7 +59,8 @@ __decorate([
|
|
|
59
59
|
__param(1, Query()),
|
|
60
60
|
__param(2, Query()),
|
|
61
61
|
__param(3, Query()),
|
|
62
|
-
__param(4, Query())
|
|
62
|
+
__param(4, Query()),
|
|
63
|
+
__param(5, Query())
|
|
63
64
|
], RestoreLogController.prototype, "getRestoreLogs", null);
|
|
64
65
|
__decorate([
|
|
65
66
|
Example(restoreLog),
|
|
@@ -100,7 +101,7 @@ let DeprecatedRestoreController = class DeprecatedRestoreController extends XoCo
|
|
|
100
101
|
* @example filter "status:success"
|
|
101
102
|
* @example limit 42
|
|
102
103
|
*/
|
|
103
|
-
async getDeprecatedRestoreLogs(req, fields, ndjson, filter, limit) {
|
|
104
|
+
async getDeprecatedRestoreLogs(req, fields, ndjson, markdown, filter, limit) {
|
|
104
105
|
const restoreLogs = await this.getObjects({ filter, limit });
|
|
105
106
|
return this.sendObjects(Object.values(restoreLogs), req, 'restore-logs');
|
|
106
107
|
}
|
|
@@ -120,7 +121,8 @@ __decorate([
|
|
|
120
121
|
__param(1, Query()),
|
|
121
122
|
__param(2, Query()),
|
|
122
123
|
__param(3, Query()),
|
|
123
|
-
__param(4, Query())
|
|
124
|
+
__param(4, Query()),
|
|
125
|
+
__param(5, Query())
|
|
124
126
|
], DeprecatedRestoreController.prototype, "getDeprecatedRestoreLogs", null);
|
|
125
127
|
__decorate([
|
|
126
128
|
Example(restoreLog),
|
|
@@ -31,7 +31,7 @@ let ScheduleController = class ScheduleController extends XoController {
|
|
|
31
31
|
* @example filter "enabled?"
|
|
32
32
|
* @example limit 42
|
|
33
33
|
*/
|
|
34
|
-
async getSchedules(req, fields, ndjson, filter, limit) {
|
|
34
|
+
async getSchedules(req, fields, ndjson, markdown, filter, limit) {
|
|
35
35
|
return this.sendObjects(Object.values(await this.getObjects({ filter, limit })), req);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
@@ -66,7 +66,8 @@ __decorate([
|
|
|
66
66
|
__param(1, Query()),
|
|
67
67
|
__param(2, Query()),
|
|
68
68
|
__param(3, Query()),
|
|
69
|
-
__param(4, Query())
|
|
69
|
+
__param(4, Query()),
|
|
70
|
+
__param(5, Query())
|
|
70
71
|
], ScheduleController.prototype, "getSchedules", null);
|
|
71
72
|
__decorate([
|
|
72
73
|
Example(schedule),
|
|
@@ -32,7 +32,7 @@ let ServerController = class ServerController extends XoController {
|
|
|
32
32
|
* @example filter "status:/^connected$/"
|
|
33
33
|
* @example limit 42
|
|
34
34
|
*/
|
|
35
|
-
async getServers(req, fields, ndjson, filter, limit) {
|
|
35
|
+
async getServers(req, fields, ndjson, markdown, filter, limit) {
|
|
36
36
|
return this.sendObjects(Object.values(await this.getObjects({ filter, limit })), req);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -94,7 +94,7 @@ let ServerController = class ServerController extends XoController {
|
|
|
94
94
|
* @example filter "status:failure"
|
|
95
95
|
* @example limit 42
|
|
96
96
|
*/
|
|
97
|
-
async getServerTasks(req, id, fields, ndjson, filter, limit) {
|
|
97
|
+
async getServerTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
98
98
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
99
99
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
100
100
|
}
|
|
@@ -107,7 +107,8 @@ __decorate([
|
|
|
107
107
|
__param(1, Query()),
|
|
108
108
|
__param(2, Query()),
|
|
109
109
|
__param(3, Query()),
|
|
110
|
-
__param(4, Query())
|
|
110
|
+
__param(4, Query()),
|
|
111
|
+
__param(5, Query())
|
|
111
112
|
], ServerController.prototype, "getServers", null);
|
|
112
113
|
__decorate([
|
|
113
114
|
Example(server),
|
|
@@ -161,7 +162,8 @@ __decorate([
|
|
|
161
162
|
__param(2, Query()),
|
|
162
163
|
__param(3, Query()),
|
|
163
164
|
__param(4, Query()),
|
|
164
|
-
__param(5, Query())
|
|
165
|
+
__param(5, Query()),
|
|
166
|
+
__param(6, Query())
|
|
165
167
|
], ServerController.prototype, "getServerTasks", null);
|
|
166
168
|
ServerController = __decorate([
|
|
167
169
|
Route('servers'),
|
|
@@ -23,7 +23,7 @@ let SmController = class SmController extends XapiXoController {
|
|
|
23
23
|
* @example filter "SM_type:ext"
|
|
24
24
|
* @example limit 42
|
|
25
25
|
*/
|
|
26
|
-
getSrs(req, fields, ndjson, filter, limit) {
|
|
26
|
+
getSrs(req, fields, ndjson, markdown, filter, limit) {
|
|
27
27
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -41,7 +41,8 @@ __decorate([
|
|
|
41
41
|
__param(1, Query()),
|
|
42
42
|
__param(2, Query()),
|
|
43
43
|
__param(3, Query()),
|
|
44
|
-
__param(4, Query())
|
|
44
|
+
__param(4, Query()),
|
|
45
|
+
__param(5, Query())
|
|
45
46
|
], SmController.prototype, "getSrs", null);
|
|
46
47
|
__decorate([
|
|
47
48
|
Example(sm),
|
|
@@ -33,7 +33,7 @@ let SrController = class SrController extends XapiXoController {
|
|
|
33
33
|
* @example filter "allocationStrategy:thin"
|
|
34
34
|
* @example limit 42
|
|
35
35
|
*/
|
|
36
|
-
getSrs(req, fields, ndjson, filter, limit) {
|
|
36
|
+
getSrs(req, fields, ndjson, markdown, filter, limit) {
|
|
37
37
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -48,7 +48,7 @@ let SrController = class SrController extends XapiXoController {
|
|
|
48
48
|
* @example filter "time:>1747053793"
|
|
49
49
|
* @example limit 42
|
|
50
50
|
*/
|
|
51
|
-
getSrAlarms(req, id, fields, ndjson, filter, limit) {
|
|
51
|
+
getSrAlarms(req, id, fields, ndjson, markdown, filter, limit) {
|
|
52
52
|
const sr = this.getObject(id);
|
|
53
53
|
const alarms = this.#alarmService.getAlarms({
|
|
54
54
|
filter: `${escapeUnsafeComplexMatcher(filter) ?? ''} object:uuid:${sr.uuid}`,
|
|
@@ -84,7 +84,7 @@ let SrController = class SrController extends XapiXoController {
|
|
|
84
84
|
* @example filter "name:VM_STARTED"
|
|
85
85
|
* @example limit 42
|
|
86
86
|
*/
|
|
87
|
-
getSrMessages(req, id, fields, ndjson, filter, limit) {
|
|
87
|
+
getSrMessages(req, id, fields, ndjson, markdown, filter, limit) {
|
|
88
88
|
const messages = this.getMessagesForObject(id, { filter, limit });
|
|
89
89
|
return this.sendObjects(Object.values(messages), req, 'messages');
|
|
90
90
|
}
|
|
@@ -94,7 +94,7 @@ let SrController = class SrController extends XapiXoController {
|
|
|
94
94
|
* @example filter "status:failure"
|
|
95
95
|
* @example limit 42
|
|
96
96
|
*/
|
|
97
|
-
async getSrTasks(req, id, fields, ndjson, filter, limit) {
|
|
97
|
+
async getSrTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
98
98
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
99
99
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
100
100
|
}
|
|
@@ -177,7 +177,8 @@ __decorate([
|
|
|
177
177
|
__param(1, Query()),
|
|
178
178
|
__param(2, Query()),
|
|
179
179
|
__param(3, Query()),
|
|
180
|
-
__param(4, Query())
|
|
180
|
+
__param(4, Query()),
|
|
181
|
+
__param(5, Query())
|
|
181
182
|
], SrController.prototype, "getSrs", null);
|
|
182
183
|
__decorate([
|
|
183
184
|
Example(sr),
|
|
@@ -195,7 +196,8 @@ __decorate([
|
|
|
195
196
|
__param(2, Query()),
|
|
196
197
|
__param(3, Query()),
|
|
197
198
|
__param(4, Query()),
|
|
198
|
-
__param(5, Query())
|
|
199
|
+
__param(5, Query()),
|
|
200
|
+
__param(6, Query())
|
|
199
201
|
], SrController.prototype, "getSrAlarms", null);
|
|
200
202
|
__decorate([
|
|
201
203
|
Example(vdiId),
|
|
@@ -220,7 +222,8 @@ __decorate([
|
|
|
220
222
|
__param(2, Query()),
|
|
221
223
|
__param(3, Query()),
|
|
222
224
|
__param(4, Query()),
|
|
223
|
-
__param(5, Query())
|
|
225
|
+
__param(5, Query()),
|
|
226
|
+
__param(6, Query())
|
|
224
227
|
], SrController.prototype, "getSrMessages", null);
|
|
225
228
|
__decorate([
|
|
226
229
|
Example(taskIds),
|
|
@@ -233,7 +236,8 @@ __decorate([
|
|
|
233
236
|
__param(2, Query()),
|
|
234
237
|
__param(3, Query()),
|
|
235
238
|
__param(4, Query()),
|
|
236
|
-
__param(5, Query())
|
|
239
|
+
__param(5, Query()),
|
|
240
|
+
__param(6, Query())
|
|
237
241
|
], SrController.prototype, "getSrTasks", null);
|
|
238
242
|
__decorate([
|
|
239
243
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -41,7 +41,7 @@ let TaskController = class TaskController extends XoController {
|
|
|
41
41
|
* @example filter "status:failure"
|
|
42
42
|
* @example limit 42
|
|
43
43
|
*/
|
|
44
|
-
async getTasks(req, fields, ndjson, watch, filter, limit) {
|
|
44
|
+
async getTasks(req, fields, ndjson, markdown, watch, filter, limit) {
|
|
45
45
|
if (watch) {
|
|
46
46
|
if (!ndjson) {
|
|
47
47
|
throw new ApiError('watch=true requires ndjson=true', 400);
|
|
@@ -133,7 +133,8 @@ __decorate([
|
|
|
133
133
|
__param(2, Query()),
|
|
134
134
|
__param(3, Query()),
|
|
135
135
|
__param(4, Query()),
|
|
136
|
-
__param(5, Query())
|
|
136
|
+
__param(5, Query()),
|
|
137
|
+
__param(6, Query())
|
|
137
138
|
], TaskController.prototype, "getTasks", null);
|
|
138
139
|
__decorate([
|
|
139
140
|
Example(task),
|
|
@@ -41,7 +41,7 @@ let UserController = class UserController extends XoController {
|
|
|
41
41
|
* @example filter "permission:none"
|
|
42
42
|
* @example limit 42
|
|
43
43
|
*/
|
|
44
|
-
async getUsers(req, fields, ndjson, filter, limit) {
|
|
44
|
+
async getUsers(req, fields, ndjson, markdown, filter, limit) {
|
|
45
45
|
const users = Object.values(await this.getObjects({ filter, limit }));
|
|
46
46
|
return this.sendObjects(users, req);
|
|
47
47
|
}
|
|
@@ -98,7 +98,7 @@ let UserController = class UserController extends XoController {
|
|
|
98
98
|
* @example filter "users:length:>0"
|
|
99
99
|
* @example limit 42
|
|
100
100
|
*/
|
|
101
|
-
async getUserGroups(req, id, fields, ndjson, filter, limit) {
|
|
101
|
+
async getUserGroups(req, id, fields, ndjson, markdown, filter, limit) {
|
|
102
102
|
const user = await this.getObject(id);
|
|
103
103
|
const groups = await Promise.all(user.groups.map(group => this.restApi.xoApp.getGroup(group)));
|
|
104
104
|
return this.sendObjects(limitAndFilterArray(groups, { filter, limit }), req, 'groups');
|
|
@@ -123,7 +123,7 @@ let UserController = class UserController extends XoController {
|
|
|
123
123
|
* @example filter "status:failure"
|
|
124
124
|
* @example limit 42
|
|
125
125
|
*/
|
|
126
|
-
async getUserTasks(req, id, fields, ndjson, filter, limit) {
|
|
126
|
+
async getUserTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
127
127
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
128
128
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
129
129
|
}
|
|
@@ -165,7 +165,8 @@ __decorate([
|
|
|
165
165
|
__param(1, Query()),
|
|
166
166
|
__param(2, Query()),
|
|
167
167
|
__param(3, Query()),
|
|
168
|
-
__param(4, Query())
|
|
168
|
+
__param(4, Query()),
|
|
169
|
+
__param(5, Query())
|
|
169
170
|
], UserController.prototype, "getUsers", null);
|
|
170
171
|
__decorate([
|
|
171
172
|
Example(user),
|
|
@@ -209,7 +210,8 @@ __decorate([
|
|
|
209
210
|
__param(2, Query()),
|
|
210
211
|
__param(3, Query()),
|
|
211
212
|
__param(4, Query()),
|
|
212
|
-
__param(5, Query())
|
|
213
|
+
__param(5, Query()),
|
|
214
|
+
__param(6, Query())
|
|
213
215
|
], UserController.prototype, "getUserGroups", null);
|
|
214
216
|
__decorate([
|
|
215
217
|
Example(authenticationTokens),
|
|
@@ -232,7 +234,8 @@ __decorate([
|
|
|
232
234
|
__param(2, Query()),
|
|
233
235
|
__param(3, Query()),
|
|
234
236
|
__param(4, Query()),
|
|
235
|
-
__param(5, Query())
|
|
237
|
+
__param(5, Query()),
|
|
238
|
+
__param(6, Query())
|
|
236
239
|
], UserController.prototype, "getUserTasks", null);
|
|
237
240
|
__decorate([
|
|
238
241
|
Example(authenticationToken),
|
|
@@ -57,7 +57,7 @@ let VbdController = class VbdController extends XapiXoController {
|
|
|
57
57
|
* @example filter "!bootable?"
|
|
58
58
|
* @example limit 42
|
|
59
59
|
*/
|
|
60
|
-
getVbds(req, fields, ndjson, filter, limit) {
|
|
60
|
+
getVbds(req, fields, ndjson, markdown, filter, limit) {
|
|
61
61
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -85,7 +85,7 @@ let VbdController = class VbdController extends XapiXoController {
|
|
|
85
85
|
* @example filter "time:>1747053793"
|
|
86
86
|
* @example limit 42
|
|
87
87
|
*/
|
|
88
|
-
getVbdAlarms(req, id, fields, ndjson, filter, limit) {
|
|
88
|
+
getVbdAlarms(req, id, fields, ndjson, markdown, filter, limit) {
|
|
89
89
|
const vbd = this.getObject(id);
|
|
90
90
|
const alarms = this.#alarmService.getAlarms({
|
|
91
91
|
filter: `${escapeUnsafeComplexMatcher(filter) ?? ''} object:uuid:${vbd.uuid}`,
|
|
@@ -99,7 +99,7 @@ let VbdController = class VbdController extends XapiXoController {
|
|
|
99
99
|
* @example filter "name:VM_STARTED"
|
|
100
100
|
* @example limit 42
|
|
101
101
|
*/
|
|
102
|
-
getVbdMessages(req, id, fields, ndjson, filter, limit) {
|
|
102
|
+
getVbdMessages(req, id, fields, ndjson, markdown, filter, limit) {
|
|
103
103
|
const messages = this.getMessagesForObject(id, { filter, limit });
|
|
104
104
|
return this.sendObjects(Object.values(messages), req, 'messages');
|
|
105
105
|
}
|
|
@@ -109,7 +109,7 @@ let VbdController = class VbdController extends XapiXoController {
|
|
|
109
109
|
* @example filter "status:failure"
|
|
110
110
|
* @example limit 42
|
|
111
111
|
*/
|
|
112
|
-
async getVbdTasks(req, id, fields, ndjson, filter, limit) {
|
|
112
|
+
async getVbdTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
113
113
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
114
114
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
115
115
|
}
|
|
@@ -169,7 +169,8 @@ __decorate([
|
|
|
169
169
|
__param(1, Query()),
|
|
170
170
|
__param(2, Query()),
|
|
171
171
|
__param(3, Query()),
|
|
172
|
-
__param(4, Query())
|
|
172
|
+
__param(4, Query()),
|
|
173
|
+
__param(5, Query())
|
|
173
174
|
], VbdController.prototype, "getVbds", null);
|
|
174
175
|
__decorate([
|
|
175
176
|
Example(vbd),
|
|
@@ -193,7 +194,8 @@ __decorate([
|
|
|
193
194
|
__param(2, Query()),
|
|
194
195
|
__param(3, Query()),
|
|
195
196
|
__param(4, Query()),
|
|
196
|
-
__param(5, Query())
|
|
197
|
+
__param(5, Query()),
|
|
198
|
+
__param(6, Query())
|
|
197
199
|
], VbdController.prototype, "getVbdAlarms", null);
|
|
198
200
|
__decorate([
|
|
199
201
|
Example(messageIds),
|
|
@@ -206,7 +208,8 @@ __decorate([
|
|
|
206
208
|
__param(2, Query()),
|
|
207
209
|
__param(3, Query()),
|
|
208
210
|
__param(4, Query()),
|
|
209
|
-
__param(5, Query())
|
|
211
|
+
__param(5, Query()),
|
|
212
|
+
__param(6, Query())
|
|
210
213
|
], VbdController.prototype, "getVbdMessages", null);
|
|
211
214
|
__decorate([
|
|
212
215
|
Example(taskIds),
|
|
@@ -219,7 +222,8 @@ __decorate([
|
|
|
219
222
|
__param(2, Query()),
|
|
220
223
|
__param(3, Query()),
|
|
221
224
|
__param(4, Query()),
|
|
222
|
-
__param(5, Query())
|
|
225
|
+
__param(5, Query()),
|
|
226
|
+
__param(6, Query())
|
|
223
227
|
], VbdController.prototype, "getVbdTasks", null);
|
|
224
228
|
__decorate([
|
|
225
229
|
Example(taskLocation),
|
|
@@ -33,7 +33,7 @@ let VdiSnapshotController = class VdiSnapshotController extends XapiXoController
|
|
|
33
33
|
* @example filter "snapshot_time:>1725020038"
|
|
34
34
|
* @example limit 42
|
|
35
35
|
*/
|
|
36
|
-
getVdiSnapshots(req, fields, ndjson, filter, limit) {
|
|
36
|
+
getVdiSnapshots(req, fields, ndjson, markdown, filter, limit) {
|
|
37
37
|
return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -64,7 +64,7 @@ let VdiSnapshotController = class VdiSnapshotController extends XapiXoController
|
|
|
64
64
|
* @example filter "time:>1747053793"
|
|
65
65
|
* @example limit 42
|
|
66
66
|
*/
|
|
67
|
-
getVdiSnapshotAlarms(req, id, fields, ndjson, filter, limit) {
|
|
67
|
+
getVdiSnapshotAlarms(req, id, fields, ndjson, markdown, filter, limit) {
|
|
68
68
|
const vdiSnapshot = this.getObject(id);
|
|
69
69
|
const alarms = this.#alarmService.getAlarms({
|
|
70
70
|
filter: `${escapeUnsafeComplexMatcher(filter) ?? ''} object:uuid:${vdiSnapshot.uuid}`,
|
|
@@ -85,7 +85,7 @@ let VdiSnapshotController = class VdiSnapshotController extends XapiXoController
|
|
|
85
85
|
* @example filter "name:VM_STARTED"
|
|
86
86
|
* @example limit 42
|
|
87
87
|
*/
|
|
88
|
-
getVdiSnapshotMessages(req, id, fields, ndjson, filter, limit) {
|
|
88
|
+
getVdiSnapshotMessages(req, id, fields, ndjson, markdown, filter, limit) {
|
|
89
89
|
const messages = this.getMessagesForObject(id, { filter, limit });
|
|
90
90
|
return this.sendObjects(Object.values(messages), req, 'messages');
|
|
91
91
|
}
|
|
@@ -95,7 +95,7 @@ let VdiSnapshotController = class VdiSnapshotController extends XapiXoController
|
|
|
95
95
|
* @example filter "status:failure"
|
|
96
96
|
* @example limit 42
|
|
97
97
|
*/
|
|
98
|
-
async getVdiSnapshotTasks(req, id, fields, ndjson, filter, limit) {
|
|
98
|
+
async getVdiSnapshotTasks(req, id, fields, ndjson, markdown, filter, limit) {
|
|
99
99
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
100
100
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
101
101
|
}
|
|
@@ -124,7 +124,8 @@ __decorate([
|
|
|
124
124
|
__param(1, Query()),
|
|
125
125
|
__param(2, Query()),
|
|
126
126
|
__param(3, Query()),
|
|
127
|
-
__param(4, Query())
|
|
127
|
+
__param(4, Query()),
|
|
128
|
+
__param(5, Query())
|
|
128
129
|
], VdiSnapshotController.prototype, "getVdiSnapshots", null);
|
|
129
130
|
__decorate([
|
|
130
131
|
Get('{id}.{format}'),
|
|
@@ -151,7 +152,8 @@ __decorate([
|
|
|
151
152
|
__param(2, Query()),
|
|
152
153
|
__param(3, Query()),
|
|
153
154
|
__param(4, Query()),
|
|
154
|
-
__param(5, Query())
|
|
155
|
+
__param(5, Query()),
|
|
156
|
+
__param(6, Query())
|
|
155
157
|
], VdiSnapshotController.prototype, "getVdiSnapshotAlarms", null);
|
|
156
158
|
__decorate([
|
|
157
159
|
Delete('{id}'),
|
|
@@ -170,7 +172,8 @@ __decorate([
|
|
|
170
172
|
__param(2, Query()),
|
|
171
173
|
__param(3, Query()),
|
|
172
174
|
__param(4, Query()),
|
|
173
|
-
__param(5, Query())
|
|
175
|
+
__param(5, Query()),
|
|
176
|
+
__param(6, Query())
|
|
174
177
|
], VdiSnapshotController.prototype, "getVdiSnapshotMessages", null);
|
|
175
178
|
__decorate([
|
|
176
179
|
Example(taskIds),
|
|
@@ -183,7 +186,8 @@ __decorate([
|
|
|
183
186
|
__param(2, Query()),
|
|
184
187
|
__param(3, Query()),
|
|
185
188
|
__param(4, Query()),
|
|
186
|
-
__param(5, Query())
|
|
189
|
+
__param(5, Query()),
|
|
190
|
+
__param(6, Query())
|
|
187
191
|
], VdiSnapshotController.prototype, "getVdiSnapshotTasks", null);
|
|
188
192
|
__decorate([
|
|
189
193
|
Put('{id}/tags/{tag}'),
|