@xen-orchestra/rest-api 0.8.0 → 0.9.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.
Files changed (42) hide show
  1. package/README.md +2 -1
  2. package/dist/abstract-classes/base-controller.mjs +14 -2
  3. package/dist/alarms/alarm.controller.mjs +3 -2
  4. package/dist/groups/group.controller.mjs +3 -2
  5. package/dist/helpers/cache.helper.mjs +52 -0
  6. package/dist/helpers/stream.helper.mjs +5 -0
  7. package/dist/helpers/utils.helper.mjs +3 -0
  8. package/dist/hosts/host.controller.mjs +3 -2
  9. package/dist/index.mjs +1 -1
  10. package/dist/ioc/ioc.mjs +8 -0
  11. package/dist/messages/message.controller.mjs +3 -2
  12. package/dist/middlewares/generic-error-handler.middleware.mjs +5 -1
  13. package/dist/networks/network.controller.mjs +18 -4
  14. package/dist/open-api/common/response.common.mjs +1 -1
  15. package/dist/open-api/oa-examples/pci.oa-example.mjs +30 -0
  16. package/dist/open-api/oa-examples/pgpu.oa-example.mjs +36 -0
  17. package/dist/open-api/oa-examples/schedule.oa-example.mjs +3 -0
  18. package/dist/open-api/oa-examples/vm-controller.oa-example.mjs +1 -1
  19. package/dist/open-api/oa-examples/xoa.oa-example.mjs +61 -0
  20. package/dist/open-api/routes/routes.js +589 -23
  21. package/dist/pcis/pci.controller.mjs +60 -0
  22. package/dist/pgpus/pgpu.controller.mjs +60 -0
  23. package/dist/pifs/pif.controller.mjs +3 -2
  24. package/dist/pools/pool.controller.mjs +136 -4
  25. package/dist/pools/pool.type.mjs +1 -0
  26. package/dist/schedules/schedule.controller.mjs +5 -4
  27. package/dist/servers/server.controller.mjs +19 -6
  28. package/dist/srs/sr.controller.mjs +3 -2
  29. package/dist/users/user.controller.mjs +3 -2
  30. package/dist/vbds/vbd.controller.mjs +3 -2
  31. package/dist/vdi-snapshots/vdi-snapshot.controller.mjs +3 -2
  32. package/dist/vdis/vdi.controller.mjs +3 -2
  33. package/dist/vifs/vif.controller.mjs +3 -2
  34. package/dist/vm-controller/vm-controller.controller.mjs +3 -2
  35. package/dist/vm-snapshots/vm-snapshot.controller.mjs +3 -2
  36. package/dist/vm-templates/vm-template.controller.mjs +3 -2
  37. package/dist/vms/vm.controller.mjs +72 -9
  38. package/dist/xoa/xoa.controller.mjs +39 -0
  39. package/dist/xoa/xoa.service.mjs +407 -0
  40. package/dist/xoa/xoa.type.mjs +1 -0
  41. package/open-api/spec/swagger.json +4611 -2867
  42. package/package.json +10 -4
@@ -0,0 +1,60 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8
+ return function (target, key) { decorator(target, key, paramIndex); }
9
+ };
10
+ import { Example, Get, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
11
+ import { inject } from 'inversify';
12
+ import { provide } from 'inversify-binding-decorators';
13
+ import { notFoundResp, unauthorizedResp } from '../open-api/common/response.common.mjs';
14
+ import { partialPcis, pci, pciIds } from '../open-api/oa-examples/pci.oa-example.mjs';
15
+ import { RestApi } from '../rest-api/rest-api.mjs';
16
+ import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
17
+ let PciController = class PciController extends XapiXoController {
18
+ constructor(restApi) {
19
+ super('PCI', restApi);
20
+ }
21
+ /**
22
+ * @example fields "class_name,device_name,id"
23
+ * @example filter "class_name:Non-Volatile memory controller"
24
+ * @example limit 42
25
+ */
26
+ getPcis(req, fields, ndjson, filter, limit) {
27
+ return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
+ }
29
+ /**
30
+ * @example id "9377b642-cc71-8749-1e71-308898b652da"
31
+ */
32
+ getPci(id) {
33
+ return this.getObject(id);
34
+ }
35
+ };
36
+ __decorate([
37
+ Example(pciIds),
38
+ Example(partialPcis),
39
+ Get(''),
40
+ __param(0, Request()),
41
+ __param(1, Query()),
42
+ __param(2, Query()),
43
+ __param(3, Query()),
44
+ __param(4, Query())
45
+ ], PciController.prototype, "getPcis", null);
46
+ __decorate([
47
+ Example(pci),
48
+ Get('{id}'),
49
+ Response(notFoundResp.status, notFoundResp.description),
50
+ __param(0, Path())
51
+ ], PciController.prototype, "getPci", null);
52
+ PciController = __decorate([
53
+ Route('pcis'),
54
+ Security('*'),
55
+ Response(unauthorizedResp.status, unauthorizedResp.description),
56
+ Tags('pcis'),
57
+ provide(PciController),
58
+ __param(0, inject(RestApi))
59
+ ], PciController);
60
+ export { PciController };
@@ -0,0 +1,60 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8
+ return function (target, key) { decorator(target, key, paramIndex); }
9
+ };
10
+ import { inject } from 'inversify';
11
+ import { RestApi } from '../rest-api/rest-api.mjs';
12
+ import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
13
+ import { Example, Get, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
14
+ import { notFoundResp, unauthorizedResp } from '../open-api/common/response.common.mjs';
15
+ import { provide } from 'inversify-binding-decorators';
16
+ import { partialPgpus, pgpu, pgpuIds } from '../open-api/oa-examples/pgpu.oa-example.mjs';
17
+ let PgpuController = class PgpuController extends XapiXoController {
18
+ constructor(restApi) {
19
+ super('PGPU', restApi);
20
+ }
21
+ /**
22
+ * @example fields "id,dom0Access,gpuGroup"
23
+ * @example filter "dom0Access:enabled"
24
+ * @example limit 42
25
+ */
26
+ getPgpus(req, fields, ndjson, filter, limit) {
27
+ return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
+ }
29
+ /**
30
+ * @example id "838335fa-ee21-15e1-760a-a37a3a4ef1db"
31
+ */
32
+ getPgpu(id) {
33
+ return this.getObject(id);
34
+ }
35
+ };
36
+ __decorate([
37
+ Example(pgpuIds),
38
+ Example(partialPgpus),
39
+ Get(''),
40
+ __param(0, Request()),
41
+ __param(1, Query()),
42
+ __param(2, Query()),
43
+ __param(3, Query()),
44
+ __param(4, Query())
45
+ ], PgpuController.prototype, "getPgpus", null);
46
+ __decorate([
47
+ Example(pgpu),
48
+ Get('{id}'),
49
+ Response(notFoundResp.status, notFoundResp.description),
50
+ __param(0, Path())
51
+ ], PgpuController.prototype, "getPgpu", null);
52
+ PgpuController = __decorate([
53
+ Route('pgpus'),
54
+ Security('*'),
55
+ Response(unauthorizedResp.status, unauthorizedResp.description),
56
+ Tags('pgpus'),
57
+ provide(PgpuController),
58
+ __param(0, inject(RestApi))
59
+ ], PgpuController);
60
+ export { PgpuController };
@@ -23,7 +23,7 @@ let PifController = class PifController extends XapiXoController {
23
23
  * @example filter "attached?"
24
24
  * @example limit 42
25
25
  */
26
- getPifs(req, fields, filter, limit) {
26
+ getPifs(req, fields, ndjson, filter, limit) {
27
27
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
28
  }
29
29
  /**
@@ -40,7 +40,8 @@ __decorate([
40
40
  __param(0, Request()),
41
41
  __param(1, Query()),
42
42
  __param(2, Query()),
43
- __param(3, Query())
43
+ __param(3, Query()),
44
+ __param(4, Query())
44
45
  ], PifController.prototype, "getPifs", null);
45
46
  __decorate([
46
47
  Example(pif),
@@ -7,13 +7,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __param = (this && this.__param) || function (paramIndex, decorator) {
8
8
  return function (target, key) { decorator(target, key, paramIndex); }
9
9
  };
10
- import { Example, Get, Path, Query, Response, Request, Route, Security, Tags } from 'tsoa';
10
+ import { Example, Get, Path, Query, Response, Request, Route, Security, Tags, Post, Middlewares, Body, SuccessResponse, } from 'tsoa';
11
11
  import { inject } from 'inversify';
12
12
  import { provide } from 'inversify-binding-decorators';
13
+ import { json } from 'express';
13
14
  import { RestApi } from '../rest-api/rest-api.mjs';
14
- import { notFoundResp, unauthorizedResp } from '../open-api/common/response.common.mjs';
15
+ import { asynchronousActionResp, createdResp, featureUnauthorized, internalServerErrorResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
15
16
  import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
16
17
  import { partialPools, pool, poolIds } from '../open-api/oa-examples/pool.oa-example.mjs';
18
+ import { taskLocation } from '../open-api/oa-examples/task.oa-example.mjs';
19
+ import { createNetwork } from '../open-api/oa-examples/schedule.oa-example.mjs';
17
20
  let PoolController = class PoolController extends XapiXoController {
18
21
  constructor(restApi) {
19
22
  super('pool', restApi);
@@ -24,7 +27,7 @@ let PoolController = class PoolController extends XapiXoController {
24
27
  * @example filter "auto_poweron?"
25
28
  * @example limit 42
26
29
  */
27
- getPools(req, fields, filter, limit) {
30
+ getPools(req, fields, ndjson, filter, limit) {
28
31
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
29
32
  }
30
33
  /**
@@ -33,6 +36,90 @@ let PoolController = class PoolController extends XapiXoController {
33
36
  getPool(id) {
34
37
  return this.getObject(id);
35
38
  }
39
+ /**
40
+ * @example id "355ee47d-ff4c-4924-3db2-fd86ae629676"
41
+ * @example body {
42
+ * "name": "awes0me_network",
43
+ * "description": "random description",
44
+ * "pif": "ad15b2c8-3d9a-194e-c43a-e3dcda74b256",
45
+ * "vlan": 0
46
+ * }
47
+ */
48
+ createNetwork(id, body, sync) {
49
+ const poolId = id;
50
+ const action = async () => {
51
+ const { pif, ...rest } = body;
52
+ const xapiPool = this.getXapiObject(poolId);
53
+ const xapiNetwork = await xapiPool.$xapi.createNetwork({ pifId: pif, ...rest });
54
+ const network = this.restApi.getObject(xapiNetwork.uuid, 'network');
55
+ return { id: network.id };
56
+ };
57
+ return this.createAction(action, {
58
+ sync,
59
+ statusCode: createdResp.status,
60
+ taskProperties: {
61
+ name: 'create network',
62
+ objectId: poolId,
63
+ args: body,
64
+ },
65
+ });
66
+ }
67
+ /**
68
+ * @example id "355ee47d-ff4c-4924-3db2-fd86ae629677"
69
+ */
70
+ emergencyShutdown(id, sync) {
71
+ const poolId = id;
72
+ const action = async () => {
73
+ await this.restApi.xoApp.checkFeatureAuthorization('POOL_EMERGENCY_SHUTDOWN');
74
+ await this.getXapiObject(poolId).$xapi.pool_emergencyShutdown();
75
+ };
76
+ return this.createAction(action, {
77
+ sync,
78
+ statusCode: noContentResp.status,
79
+ taskProperties: {
80
+ name: 'pool emergency shutdown',
81
+ objectId: poolId,
82
+ },
83
+ });
84
+ }
85
+ /**
86
+ * @example id "355ee47d-ff4c-4924-3db2-fd86ae629677"
87
+ */
88
+ rollingReboot(id, sync) {
89
+ const poolId = id;
90
+ const action = async (task) => {
91
+ const pool = this.getObject(poolId);
92
+ await this.restApi.xoApp.rollingPoolReboot(pool, { parentTask: task });
93
+ };
94
+ return this.createAction(action, {
95
+ sync,
96
+ statusCode: noContentResp.status,
97
+ taskProperties: {
98
+ name: 'rolling pool reboot',
99
+ objectId: poolId,
100
+ progress: 0,
101
+ },
102
+ });
103
+ }
104
+ /**
105
+ * @example id "355ee47d-ff4c-4924-3db2-fd86ae629677"
106
+ */
107
+ rollingUpdate(id, sync) {
108
+ const poolId = id;
109
+ const action = async (task) => {
110
+ const pool = this.getObject(poolId);
111
+ await this.restApi.xoApp.rollingPoolUpdate(pool, { parentTask: task });
112
+ };
113
+ return this.createAction(action, {
114
+ sync,
115
+ statusCode: noContentResp.status,
116
+ taskProperties: {
117
+ name: 'rolling pool update',
118
+ objectId: poolId,
119
+ progress: 0,
120
+ },
121
+ });
122
+ }
36
123
  };
37
124
  __decorate([
38
125
  Example(poolIds),
@@ -41,7 +128,8 @@ __decorate([
41
128
  __param(0, Request()),
42
129
  __param(1, Query()),
43
130
  __param(2, Query()),
44
- __param(3, Query())
131
+ __param(3, Query()),
132
+ __param(4, Query())
45
133
  ], PoolController.prototype, "getPools", null);
46
134
  __decorate([
47
135
  Example(pool),
@@ -49,6 +137,50 @@ __decorate([
49
137
  Response(notFoundResp.status, notFoundResp.description),
50
138
  __param(0, Path())
51
139
  ], PoolController.prototype, "getPool", null);
140
+ __decorate([
141
+ Example(taskLocation),
142
+ Example(createNetwork),
143
+ Post('{id}/actions/create_network'),
144
+ Middlewares(json()),
145
+ Tags('networks'),
146
+ SuccessResponse(createdResp.status, createdResp.description),
147
+ Response(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
148
+ Response(notFoundResp.status, notFoundResp.description),
149
+ Response(internalServerErrorResp.status, internalServerErrorResp.description),
150
+ __param(0, Path()),
151
+ __param(1, Body()),
152
+ __param(2, Query())
153
+ ], PoolController.prototype, "createNetwork", null);
154
+ __decorate([
155
+ Example(taskLocation),
156
+ Post('{id}/actions/emergency_shutdown'),
157
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
158
+ Response(noContentResp.status, noContentResp.description),
159
+ Response(featureUnauthorized.status, featureUnauthorized.description),
160
+ Response(notFoundResp.status, notFoundResp.description),
161
+ __param(0, Path()),
162
+ __param(1, Query())
163
+ ], PoolController.prototype, "emergencyShutdown", null);
164
+ __decorate([
165
+ Example(taskLocation),
166
+ Post('{id}/actions/rolling_reboot'),
167
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
168
+ Response(noContentResp.status, noContentResp.description),
169
+ Response(featureUnauthorized.status, featureUnauthorized.description),
170
+ Response(notFoundResp.status, notFoundResp.description),
171
+ __param(0, Path()),
172
+ __param(1, Query())
173
+ ], PoolController.prototype, "rollingReboot", null);
174
+ __decorate([
175
+ Example(taskLocation),
176
+ Post('{id}/actions/rolling_update'),
177
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
178
+ Response(noContentResp.status, noContentResp.description),
179
+ Response(featureUnauthorized.status, featureUnauthorized.description),
180
+ Response(notFoundResp.status, notFoundResp.description),
181
+ __param(0, Path()),
182
+ __param(1, Query())
183
+ ], PoolController.prototype, "rollingUpdate", null);
52
184
  PoolController = __decorate([
53
185
  Route('pools'),
54
186
  Security('*'),
@@ -0,0 +1 @@
1
+ export {};
@@ -9,7 +9,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
9
  };
10
10
  import { Example, Get, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags } from 'tsoa';
11
11
  import { provide } from 'inversify-binding-decorators';
12
- import { actionAsyncroneResp, featureUnauthorized, internalServerErrorResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
12
+ import { asynchronousActionResp, featureUnauthorized, internalServerErrorResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
13
13
  import { partialSchedules, schedule, scheduleIds } from '../open-api/oa-examples/schedule.oa-example.mjs';
14
14
  import { taskLocation } from '../open-api/oa-examples/task.oa-example.mjs';
15
15
  import { XoController } from '../abstract-classes/xo-controller.mjs';
@@ -26,7 +26,7 @@ let ScheduleController = class ScheduleController extends XoController {
26
26
  * @example filter "enabled?"
27
27
  * @example limit 42
28
28
  */
29
- async getSchedules(req, fields, filter, limit) {
29
+ async getSchedules(req, fields, ndjson, filter, limit) {
30
30
  return this.sendObjects(Object.values(await this.getObjects({ filter, limit })), req);
31
31
  }
32
32
  /**
@@ -60,7 +60,8 @@ __decorate([
60
60
  __param(0, Request()),
61
61
  __param(1, Query()),
62
62
  __param(2, Query()),
63
- __param(3, Query())
63
+ __param(3, Query()),
64
+ __param(4, Query())
64
65
  ], ScheduleController.prototype, "getSchedules", null);
65
66
  __decorate([
66
67
  Example(schedule),
@@ -71,7 +72,7 @@ __decorate([
71
72
  __decorate([
72
73
  Example(taskLocation),
73
74
  Post('{id}/actions/run'),
74
- SuccessResponse(actionAsyncroneResp.status, actionAsyncroneResp.description, actionAsyncroneResp.produce),
75
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
75
76
  Response(noContentResp.status, noContentResp.description),
76
77
  Response(featureUnauthorized.status, featureUnauthorized.description),
77
78
  Response(notFoundResp.status, notFoundResp.description),
@@ -7,10 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __param = (this && this.__param) || function (paramIndex, decorator) {
8
8
  return function (target, key) { decorator(target, key, paramIndex); }
9
9
  };
10
- import { Body, Example, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
10
+ import { Body, Delete, Example, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
11
11
  import { json } from 'express';
12
12
  import { provide } from 'inversify-binding-decorators';
13
- import { actionAsyncroneResp, createdResp, invalidParameters, noContentResp, notFoundResp, resourceAlreadyExists, unauthorizedResp, } from '../open-api/common/response.common.mjs';
13
+ import { asynchronousActionResp, createdResp, invalidParameters, noContentResp, notFoundResp, resourceAlreadyExists, unauthorizedResp, } from '../open-api/common/response.common.mjs';
14
14
  import { partialServers, server, serverId, serverIds } from '../open-api/oa-examples/server.oa-example.mjs';
15
15
  import { taskLocation } from '../open-api/oa-examples/task.oa-example.mjs';
16
16
  import { XoController } from '../abstract-classes/xo-controller.mjs';
@@ -27,7 +27,7 @@ let ServerController = class ServerController extends XoController {
27
27
  * @example filter "status:/^connected$/"
28
28
  * @example limit 42
29
29
  */
30
- async getServers(req, fields, filter, limit) {
30
+ async getServers(req, fields, ndjson, filter, limit) {
31
31
  return this.sendObjects(Object.values(await this.getObjects({ filter, limit })), req);
32
32
  }
33
33
  /**
@@ -36,6 +36,12 @@ let ServerController = class ServerController extends XoController {
36
36
  getServer(id) {
37
37
  return this.getObject(id);
38
38
  }
39
+ /**
40
+ * @example id "f07ab729-c0e8-721c-45ec-f11276377030"
41
+ */
42
+ async deleteServer(id) {
43
+ await this.restApi.xoApp.unregisterXenServer(id);
44
+ }
39
45
  /**
40
46
  * @example body {
41
47
  * "allowUnauthorized": true,
@@ -85,7 +91,8 @@ __decorate([
85
91
  __param(0, Request()),
86
92
  __param(1, Query()),
87
93
  __param(2, Query()),
88
- __param(3, Query())
94
+ __param(3, Query()),
95
+ __param(4, Query())
89
96
  ], ServerController.prototype, "getServers", null);
90
97
  __decorate([
91
98
  Example(server),
@@ -93,6 +100,12 @@ __decorate([
93
100
  Response(notFoundResp.status, notFoundResp.description),
94
101
  __param(0, Path())
95
102
  ], ServerController.prototype, "getServer", null);
103
+ __decorate([
104
+ Delete('{id}'),
105
+ SuccessResponse(noContentResp.status, noContentResp.description),
106
+ Response(notFoundResp.status, notFoundResp.description),
107
+ __param(0, Path())
108
+ ], ServerController.prototype, "deleteServer", null);
96
109
  __decorate([
97
110
  Example(serverId),
98
111
  Post(''),
@@ -105,7 +118,7 @@ __decorate([
105
118
  __decorate([
106
119
  Example(taskLocation),
107
120
  Post('{id}/actions/connect'),
108
- SuccessResponse(actionAsyncroneResp.status, actionAsyncroneResp.description, actionAsyncroneResp.produce),
121
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
109
122
  Response(noContentResp.status, noContentResp.description),
110
123
  Response(notFoundResp.status, notFoundResp.description),
111
124
  Response(409, 'The server is already connected'),
@@ -115,7 +128,7 @@ __decorate([
115
128
  __decorate([
116
129
  Example(taskLocation),
117
130
  Post('{id}/actions/disconnect'),
118
- SuccessResponse(actionAsyncroneResp.status, actionAsyncroneResp.description, actionAsyncroneResp.produce),
131
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description, asynchronousActionResp.produce),
119
132
  Response(noContentResp.status, noContentResp.description),
120
133
  Response(notFoundResp.status, notFoundResp.description),
121
134
  Response(409, 'The server is already disconnected'),
@@ -23,7 +23,7 @@ let SrController = class SrController extends XapiXoController {
23
23
  * @example filter "allocationStrategy:thin"
24
24
  * @example limit 42
25
25
  */
26
- getSrs(req, fields, filter, limit) {
26
+ getSrs(req, fields, ndjson, filter, limit) {
27
27
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
28
  }
29
29
  /**
@@ -40,7 +40,8 @@ __decorate([
40
40
  __param(0, Request()),
41
41
  __param(1, Query()),
42
42
  __param(2, Query()),
43
- __param(3, Query())
43
+ __param(3, Query()),
44
+ __param(4, Query())
44
45
  ], SrController.prototype, "getSrs", null);
45
46
  __decorate([
46
47
  Example(sr),
@@ -34,7 +34,7 @@ let UserController = class UserController extends XoController {
34
34
  * @example filter "permission:none"
35
35
  * @example limit 42
36
36
  */
37
- async getUsers(req, fields, filter, limit) {
37
+ async getUsers(req, fields, ndjson, filter, limit) {
38
38
  const users = Object.values(await this.getObjects({ filter, limit }));
39
39
  return this.sendObjects(users, req);
40
40
  }
@@ -52,7 +52,8 @@ __decorate([
52
52
  __param(0, Request()),
53
53
  __param(1, Query()),
54
54
  __param(2, Query()),
55
- __param(3, Query())
55
+ __param(3, Query()),
56
+ __param(4, Query())
56
57
  ], UserController.prototype, "getUsers", null);
57
58
  __decorate([
58
59
  Example(user),
@@ -24,7 +24,7 @@ let VbdController = class VbdController extends XapiXoController {
24
24
  * @example filter "!bootable?"
25
25
  * @example limit 42
26
26
  */
27
- getVbds(req, fields, filter, limit) {
27
+ getVbds(req, fields, ndjson, filter, limit) {
28
28
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
29
29
  }
30
30
  /**
@@ -42,7 +42,8 @@ __decorate([
42
42
  __param(0, Request()),
43
43
  __param(1, Query()),
44
44
  __param(2, Query()),
45
- __param(3, Query())
45
+ __param(3, Query()),
46
+ __param(4, Query())
46
47
  ], VbdController.prototype, "getVbds", null);
47
48
  __decorate([
48
49
  Example(vbd),
@@ -23,7 +23,7 @@ let VdiSnapshotController = class VdiSnapshotController extends XapiXoController
23
23
  * @example filter "snapshot_time:>1725020038"
24
24
  * @example limit 42
25
25
  */
26
- getVdiSnapshots(req, fields, filter, limit) {
26
+ getVdiSnapshots(req, fields, ndjson, filter, limit) {
27
27
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
28
  }
29
29
  /**
@@ -40,7 +40,8 @@ __decorate([
40
40
  __param(0, Request()),
41
41
  __param(1, Query()),
42
42
  __param(2, Query()),
43
- __param(3, Query())
43
+ __param(3, Query()),
44
+ __param(4, Query())
44
45
  ], VdiSnapshotController.prototype, "getVdiSnapshots", null);
45
46
  __decorate([
46
47
  Example(vdiSnapshot),
@@ -23,7 +23,7 @@ let VdiController = class VdiController extends XapiXoController {
23
23
  * @example filter "snapshots:length:>2"
24
24
  * @example limit 42
25
25
  */
26
- getVdis(req, fields, filter, limit) {
26
+ getVdis(req, fields, ndjson, filter, limit) {
27
27
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
28
  }
29
29
  /**
@@ -40,7 +40,8 @@ __decorate([
40
40
  __param(0, Request()),
41
41
  __param(1, Query()),
42
42
  __param(2, Query()),
43
- __param(3, Query())
43
+ __param(3, Query()),
44
+ __param(4, Query())
44
45
  ], VdiController.prototype, "getVdis", null);
45
46
  __decorate([
46
47
  Example(vdi),
@@ -23,7 +23,7 @@ let VifController = class VifController extends XapiXoController {
23
23
  * @example filter "attached?"
24
24
  * @example limit 42
25
25
  */
26
- getVifs(req, fields, filter, limit) {
26
+ getVifs(req, fields, ndjson, filter, limit) {
27
27
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
28
  }
29
29
  /**
@@ -40,7 +40,8 @@ __decorate([
40
40
  __param(0, Request()),
41
41
  __param(1, Query()),
42
42
  __param(2, Query()),
43
- __param(3, Query())
43
+ __param(3, Query()),
44
+ __param(4, Query())
44
45
  ], VifController.prototype, "getVifs", null);
45
46
  __decorate([
46
47
  Example(vif),
@@ -24,7 +24,7 @@ let VmControllerController = class VmControllerController extends XapiXoControll
24
24
  * @example filter "power_state:Running"
25
25
  * @example limit 42
26
26
  */
27
- getVmControllers(req, fields, filter, limit) {
27
+ getVmControllers(req, fields, ndjson, filter, limit) {
28
28
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
29
29
  }
30
30
  /**
@@ -41,7 +41,8 @@ __decorate([
41
41
  __param(0, Request()),
42
42
  __param(1, Query()),
43
43
  __param(2, Query()),
44
- __param(3, Query())
44
+ __param(3, Query()),
45
+ __param(4, Query())
45
46
  ], VmControllerController.prototype, "getVmControllers", null);
46
47
  __decorate([
47
48
  Example(vmController),
@@ -24,7 +24,7 @@ let VmSnapshotController = class VmSnapshotController extends XapiXoController {
24
24
  * @example filter "snapshot_time:>1725020038"
25
25
  * @example limit 42
26
26
  */
27
- getVmSnapshots(req, fields, filter, limit) {
27
+ getVmSnapshots(req, fields, ndjson, filter, limit) {
28
28
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
29
29
  }
30
30
  /**
@@ -41,7 +41,8 @@ __decorate([
41
41
  __param(0, Request()),
42
42
  __param(1, Query()),
43
43
  __param(2, Query()),
44
- __param(3, Query())
44
+ __param(3, Query()),
45
+ __param(4, Query())
45
46
  ], VmSnapshotController.prototype, "getVmSnapshots", null);
46
47
  __decorate([
47
48
  Example(vmSnapshot),
@@ -23,7 +23,7 @@ let VmTemplateController = class VmTemplateController extends XapiXoController {
23
23
  * @example filter "isDefaultTemplate?"
24
24
  * @example limit 42
25
25
  * */
26
- getVmTemplates(req, fields, filter, limit) {
26
+ getVmTemplates(req, fields, ndjson, filter, limit) {
27
27
  return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
28
  }
29
29
  /**
@@ -40,7 +40,8 @@ __decorate([
40
40
  __param(0, Request()),
41
41
  __param(1, Query()),
42
42
  __param(2, Query()),
43
- __param(3, Query())
43
+ __param(3, Query()),
44
+ __param(4, Query())
44
45
  ], VmTemplateController.prototype, "getVmTemplates", null);
45
46
  __decorate([
46
47
  Example(vmTemplate),