@xen-orchestra/rest-api 0.31.1 → 0.33.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/README.md +4 -4
- package/dist/acl-privileges/acl-privilege.controller.mjs +7 -2
- package/dist/acl-roles/acl-role.controller.mjs +13 -2
- package/dist/alarms/alarm.controller.mjs +3 -1
- package/dist/backup-archives/backup-archive.controller.mjs +3 -1
- package/dist/backup-jobs/backup-job.controller.mjs +12 -1
- package/dist/backup-logs/backup-log.controller.mjs +3 -1
- package/dist/backup-repositories/backup-repositories.controller.mjs +3 -1
- package/dist/events/event.controller.mjs +4 -1
- package/dist/groups/group.controller.mjs +10 -1
- package/dist/hosts/host.controller.mjs +16 -1
- package/dist/index.mjs +2 -0
- package/dist/mcp/mcp.controller.mjs +59 -0
- package/dist/mcp/mcp.helper.mjs +11 -0
- package/dist/messages/message.controller.mjs +3 -1
- package/dist/middlewares/mcp-gate.middleware.mjs +30 -0
- package/dist/networks/network.controller.mjs +9 -1
- package/dist/open-api/routes/routes.js +118 -5
- package/dist/pbds/pbd.controller.mjs +5 -1
- package/dist/pcis/pci.controller.mjs +3 -1
- package/dist/pgpus/pgpu.controller.mjs +3 -1
- package/dist/pifs/pif.controller.mjs +6 -1
- package/dist/pools/pool.controller.mjs +20 -1
- package/dist/proxies/proxy.controller.mjs +3 -1
- package/dist/restore-logs/restore-log.controller.mjs +5 -1
- package/dist/schedules/schedule.controller.mjs +4 -1
- package/dist/servers/server.controller.mjs +8 -1
- package/dist/sms/sm.controller.mjs +3 -1
- package/dist/srs/sr.controller.mjs +13 -1
- package/dist/tasks/task.controller.mjs +6 -1
- package/dist/users/user.controller.mjs +13 -2
- package/dist/vbds/vbd.controller.mjs +10 -1
- package/dist/vdi-snapshots/vdi-snapshot.controller.mjs +10 -1
- package/dist/vdis/vdi.controller.mjs +13 -1
- package/dist/vifs/vif.controller.mjs +10 -1
- package/dist/vm-controller/vm-controller.controller.mjs +9 -1
- package/dist/vm-snapshots/vm-snapshot.controller.mjs +11 -1
- package/dist/vm-templates/vm-template.controller.mjs +11 -1
- package/dist/vms/vm.controller.mjs +77 -2
- package/dist/vms/vm.service.mjs +17 -0
- package/dist/xoa/xoa.controller.mjs +4 -1
- package/eslint-rules/index.cjs +7 -0
- package/eslint-rules/require-mcp-expose.cjs +129 -0
- package/open-api/spec/swagger.json +1764 -495
- package/package.json +3 -3
- package/tsoa.json +2 -1
|
@@ -7,7 +7,7 @@ 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, Delete, Deprecated, Example, Get, Middlewares, Patch, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
10
|
+
import { Body, Delete, Deprecated, Example, Extension, Get, Middlewares, Patch, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { createLogger } from '@xen-orchestra/log';
|
|
12
12
|
import { forbiddenOperation } from 'xo-common/api-errors.js';
|
|
13
13
|
import { inject } from 'inversify';
|
|
@@ -217,6 +217,7 @@ let UserController = class UserController extends XoController {
|
|
|
217
217
|
__decorate([
|
|
218
218
|
Example(userIds),
|
|
219
219
|
Example(partialUsers),
|
|
220
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
220
221
|
Get(''),
|
|
221
222
|
Security('*', ['acl']),
|
|
222
223
|
__param(0, Request()),
|
|
@@ -228,6 +229,7 @@ __decorate([
|
|
|
228
229
|
], UserController.prototype, "getUsers", null);
|
|
229
230
|
__decorate([
|
|
230
231
|
Example(user),
|
|
232
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
231
233
|
Get('{id}'),
|
|
232
234
|
Middlewares(acl({
|
|
233
235
|
resource: 'user',
|
|
@@ -240,6 +242,7 @@ __decorate([
|
|
|
240
242
|
__param(0, Path())
|
|
241
243
|
], UserController.prototype, "getUser", null);
|
|
242
244
|
__decorate([
|
|
245
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
243
246
|
Patch('{id}'),
|
|
244
247
|
Middlewares([
|
|
245
248
|
json(),
|
|
@@ -259,6 +262,7 @@ __decorate([
|
|
|
259
262
|
], UserController.prototype, "updateUser", null);
|
|
260
263
|
__decorate([
|
|
261
264
|
Example(userId),
|
|
265
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
262
266
|
Post(''),
|
|
263
267
|
Middlewares([json(), acl({ resource: 'user', action: 'create', object: ({ req }) => req.body })]),
|
|
264
268
|
SuccessResponse(createdResp.status, createdResp.description),
|
|
@@ -268,6 +272,7 @@ __decorate([
|
|
|
268
272
|
__param(0, Body())
|
|
269
273
|
], UserController.prototype, "createUser", null);
|
|
270
274
|
__decorate([
|
|
275
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
271
276
|
Delete('{id}'),
|
|
272
277
|
Middlewares(acl({
|
|
273
278
|
resource: 'user',
|
|
@@ -283,6 +288,7 @@ __decorate([
|
|
|
283
288
|
__decorate([
|
|
284
289
|
Example(groupIds),
|
|
285
290
|
Example(partialGroups),
|
|
291
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
286
292
|
Get('{id}/groups'),
|
|
287
293
|
Security('*', ['acl']),
|
|
288
294
|
Tags('groups'),
|
|
@@ -297,6 +303,7 @@ __decorate([
|
|
|
297
303
|
], UserController.prototype, "getUserGroups", null);
|
|
298
304
|
__decorate([
|
|
299
305
|
Example(authenticationTokens),
|
|
306
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
300
307
|
Get('{id}/authentication_tokens'),
|
|
301
308
|
Security('*', ['acl']),
|
|
302
309
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -309,6 +316,7 @@ __decorate([
|
|
|
309
316
|
__decorate([
|
|
310
317
|
Example(taskIds),
|
|
311
318
|
Example(partialTasks),
|
|
319
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
312
320
|
Get('{id}/tasks'),
|
|
313
321
|
Security('*', ['acl']),
|
|
314
322
|
Tags('tasks'),
|
|
@@ -324,6 +332,7 @@ __decorate([
|
|
|
324
332
|
__decorate([
|
|
325
333
|
Example(authenticationToken),
|
|
326
334
|
Deprecated(),
|
|
335
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
327
336
|
Post('authentication_tokens'),
|
|
328
337
|
Middlewares(json()),
|
|
329
338
|
SuccessResponse(createdResp.status, createdResp.description),
|
|
@@ -332,6 +341,7 @@ __decorate([
|
|
|
332
341
|
], UserController.prototype, "postDeprecatedAuthenticationTokens", null);
|
|
333
342
|
__decorate([
|
|
334
343
|
Example(authenticationToken),
|
|
344
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
335
345
|
Post('{id}/authentication_tokens'),
|
|
336
346
|
Middlewares(json()),
|
|
337
347
|
Security('*', ['acl']),
|
|
@@ -344,9 +354,10 @@ __decorate([
|
|
|
344
354
|
__decorate([
|
|
345
355
|
Example(aclPrivilegeIds),
|
|
346
356
|
Example(partialAclPrivileges),
|
|
357
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
347
358
|
Get('{id}/acl-privileges'),
|
|
348
359
|
Security('*', ['acl']),
|
|
349
|
-
Tags('
|
|
360
|
+
Tags('rbacs'),
|
|
350
361
|
Response(notFoundResp.status, notFoundResp.description),
|
|
351
362
|
__param(0, Request()),
|
|
352
363
|
__param(1, Path()),
|
|
@@ -7,7 +7,7 @@ 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, Delete, Example, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
10
|
+
import { Body, Delete, Example, Extension, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { json } from 'express';
|
|
12
12
|
import { inject } from 'inversify';
|
|
13
13
|
import { invalidParameters as invalidParametersError } from 'xo-common/api-errors.js';
|
|
@@ -183,6 +183,7 @@ let VbdController = class VbdController extends XapiXoController {
|
|
|
183
183
|
__decorate([
|
|
184
184
|
Example(vbdIds),
|
|
185
185
|
Example(partialVbds),
|
|
186
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
186
187
|
Get(''),
|
|
187
188
|
Security('*', ['acl']),
|
|
188
189
|
__param(0, Request()),
|
|
@@ -194,6 +195,7 @@ __decorate([
|
|
|
194
195
|
], VbdController.prototype, "getVbds", null);
|
|
195
196
|
__decorate([
|
|
196
197
|
Example(vbd),
|
|
198
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
197
199
|
Get('{id}'),
|
|
198
200
|
Middlewares(acl({ resource: 'vbd', action: 'read', objectId: 'params.id' })),
|
|
199
201
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -202,6 +204,7 @@ __decorate([
|
|
|
202
204
|
], VbdController.prototype, "getVbd", null);
|
|
203
205
|
__decorate([
|
|
204
206
|
Example(vbdId),
|
|
207
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
205
208
|
Post(''),
|
|
206
209
|
Middlewares(json()),
|
|
207
210
|
SuccessResponse(createdResp.status, createdResp.description),
|
|
@@ -210,6 +213,7 @@ __decorate([
|
|
|
210
213
|
__param(0, Body())
|
|
211
214
|
], VbdController.prototype, "createVbd", null);
|
|
212
215
|
__decorate([
|
|
216
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
213
217
|
Delete('{id}'),
|
|
214
218
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
215
219
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -217,6 +221,7 @@ __decorate([
|
|
|
217
221
|
], VbdController.prototype, "deleteVbd", null);
|
|
218
222
|
__decorate([
|
|
219
223
|
Example(genericAlarmsExample),
|
|
224
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
220
225
|
Get('{id}/alarms'),
|
|
221
226
|
Security('*', ['acl']),
|
|
222
227
|
Tags('alarms'),
|
|
@@ -232,6 +237,7 @@ __decorate([
|
|
|
232
237
|
__decorate([
|
|
233
238
|
Example(messageIds),
|
|
234
239
|
Example(partialMessages),
|
|
240
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
235
241
|
Get('{id}/messages'),
|
|
236
242
|
Security('*', ['acl']),
|
|
237
243
|
Tags('messages'),
|
|
@@ -247,6 +253,7 @@ __decorate([
|
|
|
247
253
|
__decorate([
|
|
248
254
|
Example(taskIds),
|
|
249
255
|
Example(partialTasks),
|
|
256
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
250
257
|
Get('{id}/tasks'),
|
|
251
258
|
Security('*', ['acl']),
|
|
252
259
|
Tags('tasks'),
|
|
@@ -261,6 +268,7 @@ __decorate([
|
|
|
261
268
|
], VbdController.prototype, "getVbdTasks", null);
|
|
262
269
|
__decorate([
|
|
263
270
|
Example(taskLocation),
|
|
271
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
264
272
|
Post('{id}/actions/connect'),
|
|
265
273
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
266
274
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -271,6 +279,7 @@ __decorate([
|
|
|
271
279
|
], VbdController.prototype, "connectVbd", null);
|
|
272
280
|
__decorate([
|
|
273
281
|
Example(taskLocation),
|
|
282
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
274
283
|
Post('{id}/actions/disconnect'),
|
|
275
284
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
276
285
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -7,7 +7,7 @@ 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 { Delete, Example, Get, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags } from 'tsoa';
|
|
10
|
+
import { Delete, Example, Extension, Get, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
13
|
import { escapeUnsafeComplexMatcher } from '../helpers/utils.helper.mjs';
|
|
@@ -145,6 +145,7 @@ let VdiSnapshotController = class VdiSnapshotController extends XapiXoController
|
|
|
145
145
|
__decorate([
|
|
146
146
|
Example(vdiSnapshotIds),
|
|
147
147
|
Example(partialVdiSnapshots),
|
|
148
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
148
149
|
Get(''),
|
|
149
150
|
Security('*', ['acl']),
|
|
150
151
|
__param(0, Request()),
|
|
@@ -155,6 +156,7 @@ __decorate([
|
|
|
155
156
|
__param(5, Query())
|
|
156
157
|
], VdiSnapshotController.prototype, "getVdiSnapshots", null);
|
|
157
158
|
__decorate([
|
|
159
|
+
Extension('x-mcp-exposure', 'deny'),
|
|
158
160
|
Get('{id}.{format}'),
|
|
159
161
|
SuccessResponse(200, 'Download started', 'application/octet-stream'),
|
|
160
162
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -165,12 +167,14 @@ __decorate([
|
|
|
165
167
|
], VdiSnapshotController.prototype, "exportVdiSnapshotContent", null);
|
|
166
168
|
__decorate([
|
|
167
169
|
Example(vdiSnapshot),
|
|
170
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
168
171
|
Get('{id}'),
|
|
169
172
|
Response(notFoundResp.status, notFoundResp.description),
|
|
170
173
|
__param(0, Path())
|
|
171
174
|
], VdiSnapshotController.prototype, "getVdiSnapshot", null);
|
|
172
175
|
__decorate([
|
|
173
176
|
Example(genericAlarmsExample),
|
|
177
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
174
178
|
Get('{id}/alarms'),
|
|
175
179
|
Security('*', ['acl']),
|
|
176
180
|
Tags('alarms'),
|
|
@@ -184,6 +188,7 @@ __decorate([
|
|
|
184
188
|
__param(6, Query())
|
|
185
189
|
], VdiSnapshotController.prototype, "getVdiSnapshotAlarms", null);
|
|
186
190
|
__decorate([
|
|
191
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
187
192
|
Delete('{id}'),
|
|
188
193
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
189
194
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -192,6 +197,7 @@ __decorate([
|
|
|
192
197
|
__decorate([
|
|
193
198
|
Example(messageIds),
|
|
194
199
|
Example(partialMessages),
|
|
200
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
195
201
|
Get('{id}/messages'),
|
|
196
202
|
Security('*', ['acl']),
|
|
197
203
|
Tags('messages'),
|
|
@@ -207,6 +213,7 @@ __decorate([
|
|
|
207
213
|
__decorate([
|
|
208
214
|
Example(taskIds),
|
|
209
215
|
Example(partialTasks),
|
|
216
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
210
217
|
Get('{id}/tasks'),
|
|
211
218
|
Security('*', ['acl']),
|
|
212
219
|
Tags('tasks'),
|
|
@@ -220,6 +227,7 @@ __decorate([
|
|
|
220
227
|
__param(6, Query())
|
|
221
228
|
], VdiSnapshotController.prototype, "getVdiSnapshotTasks", null);
|
|
222
229
|
__decorate([
|
|
230
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
223
231
|
Put('{id}/tags/{tag}'),
|
|
224
232
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
225
233
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -227,6 +235,7 @@ __decorate([
|
|
|
227
235
|
__param(1, Path())
|
|
228
236
|
], VdiSnapshotController.prototype, "putVdiSnapshotTag", null);
|
|
229
237
|
__decorate([
|
|
238
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
230
239
|
Delete('{id}/tags/{tag}'),
|
|
231
240
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
232
241
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -7,7 +7,7 @@ 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, Delete, Example, Get, Middlewares, Path, Post, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
10
|
+
import { Body, Delete, Example, Extension, Get, Middlewares, Path, Post, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
13
|
import { json } from 'express';
|
|
@@ -217,6 +217,7 @@ let VdiController = class VdiController extends XapiXoController {
|
|
|
217
217
|
__decorate([
|
|
218
218
|
Example(vdiIds),
|
|
219
219
|
Example(partialVdis),
|
|
220
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
220
221
|
Get(''),
|
|
221
222
|
Security('*', ['acl']),
|
|
222
223
|
__param(0, Request()),
|
|
@@ -227,6 +228,7 @@ __decorate([
|
|
|
227
228
|
__param(5, Query())
|
|
228
229
|
], VdiController.prototype, "getVdis", null);
|
|
229
230
|
__decorate([
|
|
231
|
+
Extension('x-mcp-exposure', 'deny'),
|
|
230
232
|
Get('{id}.{format}'),
|
|
231
233
|
Middlewares(acl({ resource: 'vdi', action: 'export-content', objectId: 'params.id' })),
|
|
232
234
|
SuccessResponse(200, 'Download started', 'application/octet-stream'),
|
|
@@ -238,6 +240,7 @@ __decorate([
|
|
|
238
240
|
__param(2, Path())
|
|
239
241
|
], VdiController.prototype, "exportVdiContent", null);
|
|
240
242
|
__decorate([
|
|
243
|
+
Extension('x-mcp-exposure', 'deny'),
|
|
241
244
|
Put('{id}.{format}'),
|
|
242
245
|
Middlewares(acl({ resource: 'vdi', action: 'import-content', objectId: 'params.id' })),
|
|
243
246
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -251,6 +254,7 @@ __decorate([
|
|
|
251
254
|
], VdiController.prototype, "importVdiContent", null);
|
|
252
255
|
__decorate([
|
|
253
256
|
Example(vdi),
|
|
257
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
254
258
|
Get('{id}'),
|
|
255
259
|
Middlewares(acl({ resource: 'vdi', action: 'read', objectId: 'params.id' })),
|
|
256
260
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -259,6 +263,7 @@ __decorate([
|
|
|
259
263
|
], VdiController.prototype, "getVdi", null);
|
|
260
264
|
__decorate([
|
|
261
265
|
Example(genericAlarmsExample),
|
|
266
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
262
267
|
Get('{id}/alarms'),
|
|
263
268
|
Security('*', ['acl']),
|
|
264
269
|
Tags('alarms'),
|
|
@@ -273,6 +278,7 @@ __decorate([
|
|
|
273
278
|
], VdiController.prototype, "getVdiAlarms", null);
|
|
274
279
|
__decorate([
|
|
275
280
|
Example(vdiId),
|
|
281
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
276
282
|
Post(''),
|
|
277
283
|
Middlewares(json()),
|
|
278
284
|
SuccessResponse(createdResp.status, createdResp.description),
|
|
@@ -281,6 +287,7 @@ __decorate([
|
|
|
281
287
|
__param(0, Body())
|
|
282
288
|
], VdiController.prototype, "createVdi", null);
|
|
283
289
|
__decorate([
|
|
290
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
284
291
|
Delete('{id}'),
|
|
285
292
|
Middlewares(acl({ resource: 'vdi', action: 'delete', objectId: 'params.id' })),
|
|
286
293
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -291,6 +298,7 @@ __decorate([
|
|
|
291
298
|
__decorate([
|
|
292
299
|
Example(messageIds),
|
|
293
300
|
Example(partialMessages),
|
|
301
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
294
302
|
Get('{id}/messages'),
|
|
295
303
|
Security('*', ['acl']),
|
|
296
304
|
Tags('messages'),
|
|
@@ -306,6 +314,7 @@ __decorate([
|
|
|
306
314
|
__decorate([
|
|
307
315
|
Example(taskIds),
|
|
308
316
|
Example(partialTasks),
|
|
317
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
309
318
|
Get('{id}/tasks'),
|
|
310
319
|
Security('*', ['acl']),
|
|
311
320
|
Tags('tasks'),
|
|
@@ -321,6 +330,7 @@ __decorate([
|
|
|
321
330
|
__decorate([
|
|
322
331
|
Example(taskLocation),
|
|
323
332
|
Example(vdiId),
|
|
333
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
324
334
|
Post('{id}/actions/migrate'),
|
|
325
335
|
Middlewares(json()),
|
|
326
336
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
@@ -332,6 +342,7 @@ __decorate([
|
|
|
332
342
|
__param(2, Query())
|
|
333
343
|
], VdiController.prototype, "migrateVdi", null);
|
|
334
344
|
__decorate([
|
|
345
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
335
346
|
Put('{id}/tags/{tag}'),
|
|
336
347
|
Middlewares(acl({ resource: 'vdi', action: 'update:tags', objectId: 'params.id' })),
|
|
337
348
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -341,6 +352,7 @@ __decorate([
|
|
|
341
352
|
__param(1, Path())
|
|
342
353
|
], VdiController.prototype, "putVdiTag", null);
|
|
343
354
|
__decorate([
|
|
355
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
344
356
|
Delete('{id}/tags/{tag}'),
|
|
345
357
|
Middlewares(acl({ resource: 'vdi', action: 'update:tags', objectId: 'params.id' })),
|
|
346
358
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -7,7 +7,7 @@ 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, Delete, Example, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
10
|
+
import { Body, Delete, Example, Extension, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { json } from 'express';
|
|
13
13
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
@@ -189,6 +189,7 @@ let VifController = class VifController extends XapiXoController {
|
|
|
189
189
|
__decorate([
|
|
190
190
|
Example(vifIds),
|
|
191
191
|
Example(partialVifs),
|
|
192
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
192
193
|
Get(''),
|
|
193
194
|
Security('*', ['acl']),
|
|
194
195
|
__param(0, Request()),
|
|
@@ -200,6 +201,7 @@ __decorate([
|
|
|
200
201
|
], VifController.prototype, "getVifs", null);
|
|
201
202
|
__decorate([
|
|
202
203
|
Example(vif),
|
|
204
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
203
205
|
Get('{id}'),
|
|
204
206
|
Middlewares(acl({ resource: 'vif', action: 'read', objectId: 'params.id' })),
|
|
205
207
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -208,6 +210,7 @@ __decorate([
|
|
|
208
210
|
], VifController.prototype, "getVif", null);
|
|
209
211
|
__decorate([
|
|
210
212
|
Example(genericAlarmsExample),
|
|
213
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
211
214
|
Get('{id}/alarms'),
|
|
212
215
|
Security('*', ['acl']),
|
|
213
216
|
Tags('alarms'),
|
|
@@ -223,6 +226,7 @@ __decorate([
|
|
|
223
226
|
__decorate([
|
|
224
227
|
Example(messageIds),
|
|
225
228
|
Example(partialMessages),
|
|
229
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
226
230
|
Get('{id}/messages'),
|
|
227
231
|
Security('*', ['acl']),
|
|
228
232
|
Tags('messages'),
|
|
@@ -238,6 +242,7 @@ __decorate([
|
|
|
238
242
|
__decorate([
|
|
239
243
|
Example(taskIds),
|
|
240
244
|
Example(partialTasks),
|
|
245
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
241
246
|
Get('{id}/tasks'),
|
|
242
247
|
Security('*', ['acl']),
|
|
243
248
|
Tags('tasks'),
|
|
@@ -252,6 +257,7 @@ __decorate([
|
|
|
252
257
|
], VifController.prototype, "getVifTasks", null);
|
|
253
258
|
__decorate([
|
|
254
259
|
Example(vifId),
|
|
260
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
255
261
|
Post(''),
|
|
256
262
|
Middlewares(json()),
|
|
257
263
|
SuccessResponse(createdResp.status, createdResp.description),
|
|
@@ -261,6 +267,7 @@ __decorate([
|
|
|
261
267
|
__param(0, Body())
|
|
262
268
|
], VifController.prototype, "createVif", null);
|
|
263
269
|
__decorate([
|
|
270
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
264
271
|
Delete('{id}'),
|
|
265
272
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
266
273
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -269,6 +276,7 @@ __decorate([
|
|
|
269
276
|
], VifController.prototype, "destroyVif", null);
|
|
270
277
|
__decorate([
|
|
271
278
|
Example(taskLocation),
|
|
279
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
272
280
|
Post('{id}/actions/connect'),
|
|
273
281
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
274
282
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -279,6 +287,7 @@ __decorate([
|
|
|
279
287
|
], VifController.prototype, "connectVif", null);
|
|
280
288
|
__decorate([
|
|
281
289
|
Example(taskLocation),
|
|
290
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
282
291
|
Post('{id}/actions/disconnect'),
|
|
283
292
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
284
293
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -10,7 +10,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
10
10
|
import { inject } from 'inversify';
|
|
11
11
|
import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
|
|
12
12
|
import { RestApi } from '../rest-api/rest-api.mjs';
|
|
13
|
-
import { Delete, Example, Get, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags,
|
|
13
|
+
import { Delete, Example, Extension, Get, Middlewares, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
14
14
|
import { AlarmService } from '../alarms/alarm.service.mjs';
|
|
15
15
|
import { escapeUnsafeComplexMatcher, limitAndFilterArray } from '../helpers/utils.helper.mjs';
|
|
16
16
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
@@ -149,6 +149,7 @@ let VmControllerController = class VmControllerController extends XapiXoControll
|
|
|
149
149
|
__decorate([
|
|
150
150
|
Example(vmControllerIds),
|
|
151
151
|
Example(partialVmControllers),
|
|
152
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
152
153
|
Get(''),
|
|
153
154
|
Security('*', ['acl']),
|
|
154
155
|
__param(0, Request()),
|
|
@@ -160,6 +161,7 @@ __decorate([
|
|
|
160
161
|
], VmControllerController.prototype, "getVmControllers", null);
|
|
161
162
|
__decorate([
|
|
162
163
|
Example(vmController),
|
|
164
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
163
165
|
Get('{id}'),
|
|
164
166
|
Middlewares(acl({ resource: 'vm-controller', action: 'read', objectId: 'params.id' })),
|
|
165
167
|
Response(notFoundResp.status, notFoundResp.description),
|
|
@@ -168,6 +170,7 @@ __decorate([
|
|
|
168
170
|
], VmControllerController.prototype, "getVmController", null);
|
|
169
171
|
__decorate([
|
|
170
172
|
Example(genericAlarmsExample),
|
|
173
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
171
174
|
Get('{id}/alarms'),
|
|
172
175
|
Security('*', ['acl']),
|
|
173
176
|
Tags('alarms'),
|
|
@@ -182,6 +185,7 @@ __decorate([
|
|
|
182
185
|
], VmControllerController.prototype, "getVmControllerAlarms", null);
|
|
183
186
|
__decorate([
|
|
184
187
|
Example(vmControllerVdis),
|
|
188
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
185
189
|
Get('{id}/vdis'),
|
|
186
190
|
Security('*', ['acl']),
|
|
187
191
|
Tags('vdis'),
|
|
@@ -197,6 +201,7 @@ __decorate([
|
|
|
197
201
|
__decorate([
|
|
198
202
|
Example(messageIds),
|
|
199
203
|
Example(partialMessages),
|
|
204
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
200
205
|
Get('{id}/messages'),
|
|
201
206
|
Security('*', ['acl']),
|
|
202
207
|
Tags('messages'),
|
|
@@ -212,6 +217,7 @@ __decorate([
|
|
|
212
217
|
__decorate([
|
|
213
218
|
Example(taskIds),
|
|
214
219
|
Example(partialTasks),
|
|
220
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
215
221
|
Get('{id}/tasks'),
|
|
216
222
|
Security('*', ['acl']),
|
|
217
223
|
Tags('tasks'),
|
|
@@ -225,6 +231,7 @@ __decorate([
|
|
|
225
231
|
__param(6, Query())
|
|
226
232
|
], VmControllerController.prototype, "getVmControllerTasks", null);
|
|
227
233
|
__decorate([
|
|
234
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
228
235
|
Put('{id}/tags/{tag}'),
|
|
229
236
|
Middlewares(acl({ resource: 'vm-controller', action: 'update:tags', objectId: 'params.id' })),
|
|
230
237
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -234,6 +241,7 @@ __decorate([
|
|
|
234
241
|
__param(1, Path())
|
|
235
242
|
], VmControllerController.prototype, "putVmControllerTag", null);
|
|
236
243
|
__decorate([
|
|
244
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
237
245
|
Delete('{id}/tags/{tag}'),
|
|
238
246
|
Middlewares(acl({ resource: 'vm-controller', action: 'update:tags', objectId: 'params.id' })),
|
|
239
247
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -7,7 +7,7 @@ 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 { Delete, Example, Get, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags,
|
|
10
|
+
import { Delete, Example, Extension, Get, Middlewares, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { AlarmService } from '../alarms/alarm.service.mjs';
|
|
13
13
|
import { escapeUnsafeComplexMatcher, limitAndFilterArray } from '../helpers/utils.helper.mjs';
|
|
@@ -178,6 +178,7 @@ let VmSnapshotController = class VmSnapshotController extends XapiXoController {
|
|
|
178
178
|
__decorate([
|
|
179
179
|
Example(vmSnapshotIds),
|
|
180
180
|
Example(partialVmSnapshots),
|
|
181
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
181
182
|
Get(''),
|
|
182
183
|
Security('*', ['acl']),
|
|
183
184
|
__param(0, Request()),
|
|
@@ -188,6 +189,7 @@ __decorate([
|
|
|
188
189
|
__param(5, Query())
|
|
189
190
|
], VmSnapshotController.prototype, "getVmSnapshots", null);
|
|
190
191
|
__decorate([
|
|
192
|
+
Extension('x-mcp-exposure', 'deny'),
|
|
191
193
|
Get('{id}.{format}'),
|
|
192
194
|
Middlewares(acl({ resource: 'vm-snapshot', action: 'export', objectId: 'params.id' })),
|
|
193
195
|
SuccessResponse(200, 'Download started', 'application/octet-stream'),
|
|
@@ -201,6 +203,7 @@ __decorate([
|
|
|
201
203
|
], VmSnapshotController.prototype, "exportVmSnapshot", null);
|
|
202
204
|
__decorate([
|
|
203
205
|
Example(vmSnapshot),
|
|
206
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
204
207
|
Get('{id}'),
|
|
205
208
|
Middlewares(acl({ resource: 'vm-snapshot', action: 'read', objectId: 'params.id' })),
|
|
206
209
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -208,6 +211,7 @@ __decorate([
|
|
|
208
211
|
__param(0, Path())
|
|
209
212
|
], VmSnapshotController.prototype, "getVmSnapshot", null);
|
|
210
213
|
__decorate([
|
|
214
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
211
215
|
Delete('{id}'),
|
|
212
216
|
Middlewares(acl({ resource: 'vm-snapshot', action: 'delete', objectId: 'params.id' })),
|
|
213
217
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -218,6 +222,7 @@ __decorate([
|
|
|
218
222
|
], VmSnapshotController.prototype, "deleteVmSnapshot", null);
|
|
219
223
|
__decorate([
|
|
220
224
|
Example(genericAlarmsExample),
|
|
225
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
221
226
|
Get('{id}/alarms'),
|
|
222
227
|
Security('*', ['acl']),
|
|
223
228
|
Tags('alarms'),
|
|
@@ -232,6 +237,7 @@ __decorate([
|
|
|
232
237
|
], VmSnapshotController.prototype, "getVmSnapshotAlarms", null);
|
|
233
238
|
__decorate([
|
|
234
239
|
Example(vmSnapshotVdis),
|
|
240
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
235
241
|
Get('{id}/vdis'),
|
|
236
242
|
Security('*', ['acl']),
|
|
237
243
|
Tags('vdis'),
|
|
@@ -247,6 +253,7 @@ __decorate([
|
|
|
247
253
|
__decorate([
|
|
248
254
|
Example(messageIds),
|
|
249
255
|
Example(partialMessages),
|
|
256
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
250
257
|
Get('{id}/messages'),
|
|
251
258
|
Security('*', ['acl']),
|
|
252
259
|
Tags('messages'),
|
|
@@ -262,6 +269,7 @@ __decorate([
|
|
|
262
269
|
__decorate([
|
|
263
270
|
Example(taskIds),
|
|
264
271
|
Example(partialTasks),
|
|
272
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
265
273
|
Get('{id}/tasks'),
|
|
266
274
|
Security('*', ['acl']),
|
|
267
275
|
Tags('tasks'),
|
|
@@ -275,6 +283,7 @@ __decorate([
|
|
|
275
283
|
__param(6, Query())
|
|
276
284
|
], VmSnapshotController.prototype, "getVmSnapshotTasks", null);
|
|
277
285
|
__decorate([
|
|
286
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
278
287
|
Put('{id}/tags/{tag}'),
|
|
279
288
|
Middlewares(acl({ resource: 'vm-snapshot', action: 'update:tags', objectId: 'params.id' })),
|
|
280
289
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -284,6 +293,7 @@ __decorate([
|
|
|
284
293
|
__param(1, Path())
|
|
285
294
|
], VmSnapshotController.prototype, "putVmSnapshotTag", null);
|
|
286
295
|
__decorate([
|
|
296
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
287
297
|
Delete('{id}/tags/{tag}'),
|
|
288
298
|
Middlewares(acl({ resource: 'vm-snapshot', action: 'update:tags', objectId: 'params.id' })),
|
|
289
299
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -7,7 +7,7 @@ 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,
|
|
10
|
+
import { Delete, Example, Extension, Get, Middlewares, Path, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
13
|
import { AlarmService } from '../alarms/alarm.service.mjs';
|
|
@@ -178,6 +178,7 @@ let VmTemplateController = class VmTemplateController extends XapiXoController {
|
|
|
178
178
|
__decorate([
|
|
179
179
|
Example(vmTemplateIds),
|
|
180
180
|
Example(partialVmTemplates),
|
|
181
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
181
182
|
Get(''),
|
|
182
183
|
Security('*', ['acl']),
|
|
183
184
|
__param(0, Request()),
|
|
@@ -188,6 +189,7 @@ __decorate([
|
|
|
188
189
|
__param(5, Query())
|
|
189
190
|
], VmTemplateController.prototype, "getVmTemplates", null);
|
|
190
191
|
__decorate([
|
|
192
|
+
Extension('x-mcp-exposure', 'deny'),
|
|
191
193
|
Get('{id}.{format}'),
|
|
192
194
|
Middlewares(acl({ resource: 'vm-template', action: 'export', objectId: 'params.id' })),
|
|
193
195
|
SuccessResponse(200, 'Download started', 'application/octet-stream'),
|
|
@@ -201,6 +203,7 @@ __decorate([
|
|
|
201
203
|
], VmTemplateController.prototype, "exportVmTemplate", null);
|
|
202
204
|
__decorate([
|
|
203
205
|
Example(vmTemplate),
|
|
206
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
204
207
|
Get('{id}'),
|
|
205
208
|
Middlewares(acl({ resource: 'vm-template', action: 'read', objectId: 'params.id' })),
|
|
206
209
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -208,6 +211,7 @@ __decorate([
|
|
|
208
211
|
__param(0, Path())
|
|
209
212
|
], VmTemplateController.prototype, "getVmTemplate", null);
|
|
210
213
|
__decorate([
|
|
214
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
211
215
|
Delete('{id}'),
|
|
212
216
|
Middlewares(acl({ resource: 'vm-template', action: 'delete', objectId: 'params.id' })),
|
|
213
217
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -218,6 +222,7 @@ __decorate([
|
|
|
218
222
|
], VmTemplateController.prototype, "deleteVmTemplate", null);
|
|
219
223
|
__decorate([
|
|
220
224
|
Example(genericAlarmsExample),
|
|
225
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
221
226
|
Get('{id}/alarms'),
|
|
222
227
|
Security('*', ['acl']),
|
|
223
228
|
Tags('alarms'),
|
|
@@ -232,6 +237,7 @@ __decorate([
|
|
|
232
237
|
], VmTemplateController.prototype, "getVmTemplateAlarms", null);
|
|
233
238
|
__decorate([
|
|
234
239
|
Example(vmTemplateVdis),
|
|
240
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
235
241
|
Get('{id}/vdis'),
|
|
236
242
|
Security('*', ['acl']),
|
|
237
243
|
Tags('vdis'),
|
|
@@ -247,6 +253,7 @@ __decorate([
|
|
|
247
253
|
__decorate([
|
|
248
254
|
Example(messageIds),
|
|
249
255
|
Example(partialMessages),
|
|
256
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
250
257
|
Get('{id}/messages'),
|
|
251
258
|
Security('*', ['acl']),
|
|
252
259
|
Tags('messages'),
|
|
@@ -262,6 +269,7 @@ __decorate([
|
|
|
262
269
|
__decorate([
|
|
263
270
|
Example(taskIds),
|
|
264
271
|
Example(partialTasks),
|
|
272
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
265
273
|
Get('{id}/tasks'),
|
|
266
274
|
Security('*', ['acl']),
|
|
267
275
|
Tags('tasks'),
|
|
@@ -275,6 +283,7 @@ __decorate([
|
|
|
275
283
|
__param(6, Query())
|
|
276
284
|
], VmTemplateController.prototype, "getVmTemplateTasks", null);
|
|
277
285
|
__decorate([
|
|
286
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
278
287
|
Put('{id}/tags/{tag}'),
|
|
279
288
|
Middlewares(acl({ resource: 'vm-template', action: 'update:tags', objectId: 'params.id' })),
|
|
280
289
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -284,6 +293,7 @@ __decorate([
|
|
|
284
293
|
__param(1, Path())
|
|
285
294
|
], VmTemplateController.prototype, "putVmTemplateTag", null);
|
|
286
295
|
__decorate([
|
|
296
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
287
297
|
Delete('{id}/tags/{tag}'),
|
|
288
298
|
Middlewares(acl({ resource: 'vm-template', action: 'update:tags', objectId: 'params.id' })),
|
|
289
299
|
SuccessResponse(noContentResp.status, noContentResp.description),
|