@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
|
@@ -9,7 +9,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
9
9
|
};
|
|
10
10
|
import { inject } from 'inversify';
|
|
11
11
|
import { provide } from 'inversify-binding-decorators';
|
|
12
|
-
import {
|
|
12
|
+
import { Example, Extension, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
13
13
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
14
14
|
import { asynchronousActionResp, badRequestResp, internalServerErrorResp, invalidParameters as invalidParametersResp, noContentResp, forbiddenOperationResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
15
15
|
import { RestApi } from '../rest-api/rest-api.mjs';
|
|
@@ -83,6 +83,7 @@ let PbdController = class PbdController extends XapiXoController {
|
|
|
83
83
|
__decorate([
|
|
84
84
|
Example(pbdIds),
|
|
85
85
|
Example(partialPbds),
|
|
86
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
86
87
|
Get(''),
|
|
87
88
|
Security('*', ['acl']),
|
|
88
89
|
__param(0, Request()),
|
|
@@ -94,6 +95,7 @@ __decorate([
|
|
|
94
95
|
], PbdController.prototype, "getPbds", null);
|
|
95
96
|
__decorate([
|
|
96
97
|
Example(pbd),
|
|
98
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
97
99
|
Get('{id}'),
|
|
98
100
|
Middlewares(acl({ resource: 'pbd', action: 'read', objectId: 'params.id' })),
|
|
99
101
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -102,6 +104,7 @@ __decorate([
|
|
|
102
104
|
], PbdController.prototype, "getPbd", null);
|
|
103
105
|
__decorate([
|
|
104
106
|
Example(taskLocation),
|
|
107
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
105
108
|
Post('{id}/actions/plug'),
|
|
106
109
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
107
110
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -113,6 +116,7 @@ __decorate([
|
|
|
113
116
|
], PbdController.prototype, "plugPbd", null);
|
|
114
117
|
__decorate([
|
|
115
118
|
Example(taskLocation),
|
|
119
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
116
120
|
Post('{id}/actions/unplug'),
|
|
117
121
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
118
122
|
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 { Example, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
10
|
+
import { Example, Extension, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
13
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
@@ -46,6 +46,7 @@ let PciController = class PciController extends XapiXoController {
|
|
|
46
46
|
__decorate([
|
|
47
47
|
Example(pciIds),
|
|
48
48
|
Example(partialPcis),
|
|
49
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
49
50
|
Get(''),
|
|
50
51
|
Security('*', ['acl']),
|
|
51
52
|
__param(0, Request()),
|
|
@@ -57,6 +58,7 @@ __decorate([
|
|
|
57
58
|
], PciController.prototype, "getPcis", null);
|
|
58
59
|
__decorate([
|
|
59
60
|
Example(pci),
|
|
61
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
60
62
|
Get('{id}'),
|
|
61
63
|
Middlewares(acl({ resource: 'pci', action: 'read', objectId: 'params.id' })),
|
|
62
64
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -10,7 +10,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
10
10
|
import { inject } from 'inversify';
|
|
11
11
|
import { RestApi } from '../rest-api/rest-api.mjs';
|
|
12
12
|
import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
|
|
13
|
-
import { Example, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
13
|
+
import { Example, Extension, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
14
14
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
15
15
|
import { badRequestResp, forbiddenOperationResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
16
16
|
import { provide } from 'inversify-binding-decorators';
|
|
@@ -46,6 +46,7 @@ let PgpuController = class PgpuController extends XapiXoController {
|
|
|
46
46
|
__decorate([
|
|
47
47
|
Example(pgpuIds),
|
|
48
48
|
Example(partialPgpus),
|
|
49
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
49
50
|
Get(''),
|
|
50
51
|
Security('*', ['acl']),
|
|
51
52
|
__param(0, Request()),
|
|
@@ -57,6 +58,7 @@ __decorate([
|
|
|
57
58
|
], PgpuController.prototype, "getPgpus", null);
|
|
58
59
|
__decorate([
|
|
59
60
|
Example(pgpu),
|
|
61
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
60
62
|
Get('{id}'),
|
|
61
63
|
Middlewares(acl({ resource: 'pgpu', action: 'read', objectId: 'params.id' })),
|
|
62
64
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.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, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
10
|
+
import { Example, Extension, Get, Middlewares, Path, Query, Request, Response, Route, Security, 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';
|
|
@@ -107,6 +107,7 @@ let PifController = class PifController extends XapiXoController {
|
|
|
107
107
|
__decorate([
|
|
108
108
|
Example(pifIds),
|
|
109
109
|
Example(partialPifs),
|
|
110
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
110
111
|
Get(''),
|
|
111
112
|
Security('*', ['acl']),
|
|
112
113
|
__param(0, Request()),
|
|
@@ -118,6 +119,7 @@ __decorate([
|
|
|
118
119
|
], PifController.prototype, "getPifs", null);
|
|
119
120
|
__decorate([
|
|
120
121
|
Example(pif),
|
|
122
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
121
123
|
Get('{id}'),
|
|
122
124
|
Middlewares(acl({ resource: 'pif', action: 'read', objectId: 'params.id' })),
|
|
123
125
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -126,6 +128,7 @@ __decorate([
|
|
|
126
128
|
], PifController.prototype, "getPif", null);
|
|
127
129
|
__decorate([
|
|
128
130
|
Example(genericAlarmsExample),
|
|
131
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
129
132
|
Get('{id}/alarms'),
|
|
130
133
|
Security('*', ['acl']),
|
|
131
134
|
Tags('alarms'),
|
|
@@ -141,6 +144,7 @@ __decorate([
|
|
|
141
144
|
__decorate([
|
|
142
145
|
Example(messageIds),
|
|
143
146
|
Example(partialMessages),
|
|
147
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
144
148
|
Get('{id}/messages'),
|
|
145
149
|
Security('*', ['acl']),
|
|
146
150
|
Tags('messages'),
|
|
@@ -156,6 +160,7 @@ __decorate([
|
|
|
156
160
|
__decorate([
|
|
157
161
|
Example(taskIds),
|
|
158
162
|
Example(partialTasks),
|
|
163
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
159
164
|
Get('{id}/tasks'),
|
|
160
165
|
Security('*', ['acl']),
|
|
161
166
|
Tags('tasks'),
|
|
@@ -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,
|
|
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 { invalidParameters } from 'xo-common/api-errors.js';
|
|
13
13
|
import { PassThrough } from 'node:stream';
|
|
@@ -427,6 +427,7 @@ let PoolController = class PoolController extends XapiXoController {
|
|
|
427
427
|
__decorate([
|
|
428
428
|
Example(poolIds),
|
|
429
429
|
Example(partialPools),
|
|
430
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
430
431
|
Get(''),
|
|
431
432
|
Security('*', ['acl']),
|
|
432
433
|
__param(0, Request()),
|
|
@@ -438,6 +439,7 @@ __decorate([
|
|
|
438
439
|
], PoolController.prototype, "getPools", null);
|
|
439
440
|
__decorate([
|
|
440
441
|
Example(pool),
|
|
442
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
441
443
|
Get('{id}'),
|
|
442
444
|
Middlewares(acl({ resource: 'pool', action: 'read', objectId: 'params.id' })),
|
|
443
445
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -447,6 +449,7 @@ __decorate([
|
|
|
447
449
|
__decorate([
|
|
448
450
|
Example(taskLocation),
|
|
449
451
|
Example(createNetwork),
|
|
452
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
450
453
|
Post('{id}/actions/create_network'),
|
|
451
454
|
Middlewares([
|
|
452
455
|
json(),
|
|
@@ -470,6 +473,7 @@ __decorate([
|
|
|
470
473
|
__decorate([
|
|
471
474
|
Example(taskLocation),
|
|
472
475
|
Example(createNetwork),
|
|
476
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
473
477
|
Post('{id}/actions/create_bonded_network'),
|
|
474
478
|
Middlewares(json()),
|
|
475
479
|
Tags('networks'),
|
|
@@ -485,6 +489,7 @@ __decorate([
|
|
|
485
489
|
__decorate([
|
|
486
490
|
Example(taskLocation),
|
|
487
491
|
Example(createNetwork),
|
|
492
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
488
493
|
Post('{id}/actions/create_internal_network'),
|
|
489
494
|
Middlewares(json()),
|
|
490
495
|
Tags('networks'),
|
|
@@ -499,6 +504,7 @@ __decorate([
|
|
|
499
504
|
], PoolController.prototype, "createInternalNetwork", null);
|
|
500
505
|
__decorate([
|
|
501
506
|
Example(taskLocation),
|
|
507
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
502
508
|
Post('{id}/actions/emergency_shutdown'),
|
|
503
509
|
Middlewares(acl({ resource: 'pool', action: 'emergency-shutdown', objectId: 'params.id' })),
|
|
504
510
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
@@ -511,6 +517,7 @@ __decorate([
|
|
|
511
517
|
], PoolController.prototype, "emergencyShutdown", null);
|
|
512
518
|
__decorate([
|
|
513
519
|
Example(taskLocation),
|
|
520
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
514
521
|
Post('{id}/actions/rolling_reboot'),
|
|
515
522
|
Middlewares(acl({ resource: 'pool', action: 'rolling-reboot', objectId: 'params.id' })),
|
|
516
523
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
@@ -523,6 +530,7 @@ __decorate([
|
|
|
523
530
|
], PoolController.prototype, "rollingReboot", null);
|
|
524
531
|
__decorate([
|
|
525
532
|
Example(taskLocation),
|
|
533
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
526
534
|
Post('{id}/actions/rolling_update'),
|
|
527
535
|
Middlewares(acl({ resource: 'pool', action: 'rolling-update', objectId: 'params.id' })),
|
|
528
536
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
@@ -535,6 +543,7 @@ __decorate([
|
|
|
535
543
|
], PoolController.prototype, "rollingUpdate", null);
|
|
536
544
|
__decorate([
|
|
537
545
|
Example(importVm),
|
|
546
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
538
547
|
Post('{id}/vms'),
|
|
539
548
|
Middlewares(acl([
|
|
540
549
|
{
|
|
@@ -563,6 +572,7 @@ __decorate([
|
|
|
563
572
|
__decorate([
|
|
564
573
|
Example(taskLocation),
|
|
565
574
|
Example(createVm),
|
|
575
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
566
576
|
Post('{id}/actions/create_vm'),
|
|
567
577
|
Middlewares([
|
|
568
578
|
json(),
|
|
@@ -607,6 +617,7 @@ __decorate([
|
|
|
607
617
|
], PoolController.prototype, "createVm", null);
|
|
608
618
|
__decorate([
|
|
609
619
|
Example(poolStats),
|
|
620
|
+
Extension('x-mcp-exposure', 'deny'),
|
|
610
621
|
Get('{id}/stats'),
|
|
611
622
|
Middlewares(acl({ resource: 'pool', action: 'read', objectId: 'params.id' })),
|
|
612
623
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -617,6 +628,7 @@ __decorate([
|
|
|
617
628
|
], PoolController.prototype, "getStats", null);
|
|
618
629
|
__decorate([
|
|
619
630
|
Example(poolDashboard),
|
|
631
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
620
632
|
Get('{id}/dashboard'),
|
|
621
633
|
Middlewares(acl({ resource: 'pool', action: 'read', objectId: 'params.id' })),
|
|
622
634
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -627,6 +639,7 @@ __decorate([
|
|
|
627
639
|
], PoolController.prototype, "getPoolDashboard", null);
|
|
628
640
|
__decorate([
|
|
629
641
|
Example(genericAlarmsExample),
|
|
642
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
630
643
|
Get('{id}/alarms'),
|
|
631
644
|
Security('*', ['acl']),
|
|
632
645
|
Tags('alarms'),
|
|
@@ -641,6 +654,7 @@ __decorate([
|
|
|
641
654
|
], PoolController.prototype, "getPoolAlarms", null);
|
|
642
655
|
__decorate([
|
|
643
656
|
Example(poolMissingPatches),
|
|
657
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
644
658
|
Get('{id}/missing_patches'),
|
|
645
659
|
Middlewares(acl({ resource: 'pool', action: 'read', objectId: 'params.id' })),
|
|
646
660
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -651,6 +665,7 @@ __decorate([
|
|
|
651
665
|
__decorate([
|
|
652
666
|
Example(messageIds),
|
|
653
667
|
Example(partialMessages),
|
|
668
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
654
669
|
Get('{id}/messages'),
|
|
655
670
|
Security('*', ['acl']),
|
|
656
671
|
Tags('messages'),
|
|
@@ -664,6 +679,7 @@ __decorate([
|
|
|
664
679
|
__param(6, Query())
|
|
665
680
|
], PoolController.prototype, "getPoolMessages", null);
|
|
666
681
|
__decorate([
|
|
682
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
667
683
|
Put('{id}/tags/{tag}'),
|
|
668
684
|
Middlewares(acl({ resource: 'pool', action: 'update:tags', objectId: 'params.id' })),
|
|
669
685
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -673,6 +689,7 @@ __decorate([
|
|
|
673
689
|
__param(1, Path())
|
|
674
690
|
], PoolController.prototype, "putPoolTag", null);
|
|
675
691
|
__decorate([
|
|
692
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
676
693
|
Delete('{id}/tags/{tag}'),
|
|
677
694
|
Middlewares(acl({ resource: 'pool', action: 'update:tags', objectId: 'params.id' })),
|
|
678
695
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -684,6 +701,7 @@ __decorate([
|
|
|
684
701
|
__decorate([
|
|
685
702
|
Example(taskIds),
|
|
686
703
|
Example(partialTasks),
|
|
704
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
687
705
|
Get('{id}/tasks'),
|
|
688
706
|
Security('*', ['acl']),
|
|
689
707
|
Tags('tasks'),
|
|
@@ -698,6 +716,7 @@ __decorate([
|
|
|
698
716
|
], PoolController.prototype, "getPoolTasks", null);
|
|
699
717
|
__decorate([
|
|
700
718
|
Example(taskLocation),
|
|
719
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
701
720
|
Post('{id}/actions/management_reconfigure'),
|
|
702
721
|
Middlewares(json()),
|
|
703
722
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.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, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
10
|
+
import { Example, Extension, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
13
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
@@ -53,6 +53,7 @@ let ProxyController = class ProxyController extends XoController {
|
|
|
53
53
|
__decorate([
|
|
54
54
|
Example(proxyIds),
|
|
55
55
|
Example(partialProxies),
|
|
56
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
56
57
|
Get(''),
|
|
57
58
|
Security('*', ['acl']),
|
|
58
59
|
__param(0, Request()),
|
|
@@ -64,6 +65,7 @@ __decorate([
|
|
|
64
65
|
], ProxyController.prototype, "getProxies", null);
|
|
65
66
|
__decorate([
|
|
66
67
|
Example(proxy),
|
|
68
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
67
69
|
Get('{id}'),
|
|
68
70
|
Middlewares(acl({
|
|
69
71
|
resource: 'proxy',
|
|
@@ -8,7 +8,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
8
8
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
9
|
};
|
|
10
10
|
import { createLogger } from '@xen-orchestra/log';
|
|
11
|
-
import { Deprecated, Example, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
11
|
+
import { Deprecated, Example, Extension, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags, } from 'tsoa';
|
|
12
12
|
import { inject } from 'inversify';
|
|
13
13
|
import { provide } from 'inversify-binding-decorators';
|
|
14
14
|
import { acl, autoBindService } from '../middlewares/acl.middleware.mjs';
|
|
@@ -59,6 +59,7 @@ let RestoreLogController = class RestoreLogController extends XoController {
|
|
|
59
59
|
__decorate([
|
|
60
60
|
Example(restoreLogIds),
|
|
61
61
|
Example(partialRestoreLogs),
|
|
62
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
62
63
|
Get(''),
|
|
63
64
|
Security('*', ['acl']),
|
|
64
65
|
__param(0, Request()),
|
|
@@ -70,6 +71,7 @@ __decorate([
|
|
|
70
71
|
], RestoreLogController.prototype, "getRestoreLogs", null);
|
|
71
72
|
__decorate([
|
|
72
73
|
Example(restoreLog),
|
|
74
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
73
75
|
Get('{id}'),
|
|
74
76
|
Middlewares(acl({
|
|
75
77
|
resource: 'restore-log',
|
|
@@ -133,6 +135,7 @@ __decorate([
|
|
|
133
135
|
Example(restoreLogIds),
|
|
134
136
|
Example(partialRestoreLogs),
|
|
135
137
|
Deprecated(),
|
|
138
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
136
139
|
Get(''),
|
|
137
140
|
__param(0, Request()),
|
|
138
141
|
__param(1, Query()),
|
|
@@ -144,6 +147,7 @@ __decorate([
|
|
|
144
147
|
__decorate([
|
|
145
148
|
Example(restoreLog),
|
|
146
149
|
Deprecated(),
|
|
150
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
147
151
|
Get('{id}'),
|
|
148
152
|
__param(0, Path())
|
|
149
153
|
], DeprecatedRestoreController.prototype, "getDeprecatedRestoreLog", null);
|
|
@@ -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, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
10
|
+
import { Example, Extension, Get, Middlewares, Path, Post, 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 { acl } from '../middlewares/acl.middleware.mjs';
|
|
@@ -76,6 +76,7 @@ let ScheduleController = class ScheduleController extends XoController {
|
|
|
76
76
|
__decorate([
|
|
77
77
|
Example(scheduleIds),
|
|
78
78
|
Example(partialSchedules),
|
|
79
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
79
80
|
Get(''),
|
|
80
81
|
Security('*', ['acl']),
|
|
81
82
|
__param(0, Request()),
|
|
@@ -87,6 +88,7 @@ __decorate([
|
|
|
87
88
|
], ScheduleController.prototype, "getSchedules", null);
|
|
88
89
|
__decorate([
|
|
89
90
|
Example(schedule),
|
|
91
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
90
92
|
Get('{id}'),
|
|
91
93
|
Middlewares(acl({
|
|
92
94
|
resource: 'schedule',
|
|
@@ -100,6 +102,7 @@ __decorate([
|
|
|
100
102
|
], ScheduleController.prototype, "getSchedule", null);
|
|
101
103
|
__decorate([
|
|
102
104
|
Example(taskLocation),
|
|
105
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
103
106
|
Post('{id}/actions/run'),
|
|
104
107
|
Middlewares(acl({
|
|
105
108
|
resource: 'schedule',
|
|
@@ -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 { provide } from 'inversify-binding-decorators';
|
|
@@ -131,6 +131,7 @@ let ServerController = class ServerController extends XoController {
|
|
|
131
131
|
__decorate([
|
|
132
132
|
Example(serverIds),
|
|
133
133
|
Example(partialServers),
|
|
134
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
134
135
|
Get(''),
|
|
135
136
|
Security('*', ['acl']),
|
|
136
137
|
__param(0, Request()),
|
|
@@ -142,6 +143,7 @@ __decorate([
|
|
|
142
143
|
], ServerController.prototype, "getServers", null);
|
|
143
144
|
__decorate([
|
|
144
145
|
Example(server),
|
|
146
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
145
147
|
Get('{id}'),
|
|
146
148
|
Middlewares(acl({
|
|
147
149
|
resource: 'server',
|
|
@@ -154,6 +156,7 @@ __decorate([
|
|
|
154
156
|
__param(0, Path())
|
|
155
157
|
], ServerController.prototype, "getServer", null);
|
|
156
158
|
__decorate([
|
|
159
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
157
160
|
Delete('{id}'),
|
|
158
161
|
Middlewares(acl({
|
|
159
162
|
resource: 'server',
|
|
@@ -168,6 +171,7 @@ __decorate([
|
|
|
168
171
|
], ServerController.prototype, "deleteServer", null);
|
|
169
172
|
__decorate([
|
|
170
173
|
Example(serverId),
|
|
174
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
171
175
|
Post(''),
|
|
172
176
|
Middlewares([json(), acl({ resource: 'server', action: 'create', object: ({ req }) => req.body })]),
|
|
173
177
|
SuccessResponse(createdResp.status, createdResp.description),
|
|
@@ -178,6 +182,7 @@ __decorate([
|
|
|
178
182
|
], ServerController.prototype, "addServer", null);
|
|
179
183
|
__decorate([
|
|
180
184
|
Example(taskLocation),
|
|
185
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
181
186
|
Post('{id}/actions/connect'),
|
|
182
187
|
Middlewares(acl({
|
|
183
188
|
resource: 'server',
|
|
@@ -195,6 +200,7 @@ __decorate([
|
|
|
195
200
|
], ServerController.prototype, "connectServer", null);
|
|
196
201
|
__decorate([
|
|
197
202
|
Example(taskLocation),
|
|
203
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
198
204
|
Post('{id}/actions/disconnect'),
|
|
199
205
|
Middlewares(acl({
|
|
200
206
|
resource: 'server',
|
|
@@ -213,6 +219,7 @@ __decorate([
|
|
|
213
219
|
__decorate([
|
|
214
220
|
Example(taskIds),
|
|
215
221
|
Example(partialTasks),
|
|
222
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
216
223
|
Get('{id}/tasks'),
|
|
217
224
|
Security('*', ['acl']),
|
|
218
225
|
Tags('tasks'),
|
|
@@ -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, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
10
|
+
import { Example, Extension, Get, Middlewares, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
|
|
11
11
|
import { inject } from 'inversify';
|
|
12
12
|
import { provide } from 'inversify-binding-decorators';
|
|
13
13
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
@@ -46,6 +46,7 @@ let SmController = class SmController extends XapiXoController {
|
|
|
46
46
|
__decorate([
|
|
47
47
|
Example(smIds),
|
|
48
48
|
Example(partialSms),
|
|
49
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
49
50
|
Get(''),
|
|
50
51
|
Security('*', ['acl']),
|
|
51
52
|
__param(0, Request()),
|
|
@@ -57,6 +58,7 @@ __decorate([
|
|
|
57
58
|
], SmController.prototype, "getSrs", null);
|
|
58
59
|
__decorate([
|
|
59
60
|
Example(sm),
|
|
61
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
60
62
|
Get('{id}'),
|
|
61
63
|
Middlewares(acl({ resource: 'sm', action: 'read', objectId: 'params.id' })),
|
|
62
64
|
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 { Delete, Example, Get, Middlewares, Path, Post, Put, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
10
|
+
import { 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 { SUPPORTED_VDI_FORMAT } from '@vates/types';
|
|
@@ -224,6 +224,7 @@ let SrController = class SrController extends XapiXoController {
|
|
|
224
224
|
__decorate([
|
|
225
225
|
Example(srIds),
|
|
226
226
|
Example(partialSrs),
|
|
227
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
227
228
|
Get(''),
|
|
228
229
|
Security('*', ['acl']),
|
|
229
230
|
__param(0, Request()),
|
|
@@ -235,6 +236,7 @@ __decorate([
|
|
|
235
236
|
], SrController.prototype, "getSrs", null);
|
|
236
237
|
__decorate([
|
|
237
238
|
Example(sr),
|
|
239
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
238
240
|
Get('{id}'),
|
|
239
241
|
Middlewares(acl({ resource: 'sr', action: 'read', objectId: 'params.id' })),
|
|
240
242
|
Response(forbiddenOperationResp.status, forbiddenOperationResp.description),
|
|
@@ -243,6 +245,7 @@ __decorate([
|
|
|
243
245
|
], SrController.prototype, "getSr", null);
|
|
244
246
|
__decorate([
|
|
245
247
|
Example(genericAlarmsExample),
|
|
248
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
246
249
|
Get('{id}/alarms'),
|
|
247
250
|
Security('*', ['acl']),
|
|
248
251
|
Tags('alarms'),
|
|
@@ -257,6 +260,7 @@ __decorate([
|
|
|
257
260
|
], SrController.prototype, "getSrAlarms", null);
|
|
258
261
|
__decorate([
|
|
259
262
|
Example(vdiId),
|
|
263
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
260
264
|
Post('{id}/vdis'),
|
|
261
265
|
Middlewares(acl({ resource: 'sr', action: 'import:vdi', objectId: 'params.id' })),
|
|
262
266
|
Tags('vdis'),
|
|
@@ -272,6 +276,7 @@ __decorate([
|
|
|
272
276
|
__decorate([
|
|
273
277
|
Example(messageIds),
|
|
274
278
|
Example(partialMessages),
|
|
279
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
275
280
|
Get('{id}/messages'),
|
|
276
281
|
Security('*', ['acl']),
|
|
277
282
|
Tags('messages'),
|
|
@@ -287,6 +292,7 @@ __decorate([
|
|
|
287
292
|
__decorate([
|
|
288
293
|
Example(taskIds),
|
|
289
294
|
Example(partialTasks),
|
|
295
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
290
296
|
Get('{id}/tasks'),
|
|
291
297
|
Security('*', ['acl']),
|
|
292
298
|
Tags('tasks'),
|
|
@@ -300,6 +306,7 @@ __decorate([
|
|
|
300
306
|
__param(6, Query())
|
|
301
307
|
], SrController.prototype, "getSrTasks", null);
|
|
302
308
|
__decorate([
|
|
309
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
303
310
|
Put('{id}/tags/{tag}'),
|
|
304
311
|
Middlewares(acl({ resource: 'sr', action: 'update:tags', objectId: 'params.id' })),
|
|
305
312
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -309,6 +316,7 @@ __decorate([
|
|
|
309
316
|
__param(1, Path())
|
|
310
317
|
], SrController.prototype, "putSrTag", null);
|
|
311
318
|
__decorate([
|
|
319
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
312
320
|
Delete('{id}/tags/{tag}'),
|
|
313
321
|
Middlewares(acl({ resource: 'sr', action: 'update:tags', objectId: 'params.id' })),
|
|
314
322
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -319,6 +327,7 @@ __decorate([
|
|
|
319
327
|
], SrController.prototype, "deleteSrTag", null);
|
|
320
328
|
__decorate([
|
|
321
329
|
Example(taskLocation),
|
|
330
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
322
331
|
Post('{id}/actions/reclaim_space'),
|
|
323
332
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
324
333
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -330,6 +339,7 @@ __decorate([
|
|
|
330
339
|
], SrController.prototype, "reclaimSpaceSr", null);
|
|
331
340
|
__decorate([
|
|
332
341
|
Example(taskLocation),
|
|
342
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
333
343
|
Post('{id}/actions/scan'),
|
|
334
344
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
335
345
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -341,6 +351,7 @@ __decorate([
|
|
|
341
351
|
], SrController.prototype, "scanSr", null);
|
|
342
352
|
__decorate([
|
|
343
353
|
Example(taskLocation),
|
|
354
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
344
355
|
Post('{id}/actions/forget'),
|
|
345
356
|
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
346
357
|
Response(noContentResp.status, noContentResp.description),
|
|
@@ -351,6 +362,7 @@ __decorate([
|
|
|
351
362
|
__param(1, Query())
|
|
352
363
|
], SrController.prototype, "forgetSr", null);
|
|
353
364
|
__decorate([
|
|
365
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
354
366
|
Delete('{id}'),
|
|
355
367
|
Middlewares(acl({ resource: 'sr', action: 'delete', objectId: 'params.id' })),
|
|
356
368
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -8,7 +8,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
8
8
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
9
|
};
|
|
10
10
|
import { XoController } from '../abstract-classes/xo-controller.mjs';
|
|
11
|
-
import {
|
|
11
|
+
import { Delete, Example, Extension, Get, Middlewares, Path, Post, Query, Request, Response, Route, Security, SuccessResponse, Tags, } from 'tsoa';
|
|
12
12
|
import { acl } from '../middlewares/acl.middleware.mjs';
|
|
13
13
|
import { asynchronousActionResp, badRequestResp, forbiddenOperationResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
14
14
|
import { inject } from 'inversify';
|
|
@@ -167,6 +167,7 @@ let TaskController = class TaskController extends XoController {
|
|
|
167
167
|
__decorate([
|
|
168
168
|
Example(taskIds),
|
|
169
169
|
Example(partialTasks),
|
|
170
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
170
171
|
Get(''),
|
|
171
172
|
Security('*', ['acl']),
|
|
172
173
|
Response(badRequestResp.status, badRequestResp.description),
|
|
@@ -180,6 +181,7 @@ __decorate([
|
|
|
180
181
|
], TaskController.prototype, "getTasks", null);
|
|
181
182
|
__decorate([
|
|
182
183
|
Example(task),
|
|
184
|
+
Extension('x-mcp-exposure', 'allow'),
|
|
183
185
|
Get('{id}'),
|
|
184
186
|
Middlewares(acl({
|
|
185
187
|
resource: 'task',
|
|
@@ -194,11 +196,13 @@ __decorate([
|
|
|
194
196
|
__param(2, Query())
|
|
195
197
|
], TaskController.prototype, "getTask", null);
|
|
196
198
|
__decorate([
|
|
199
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
197
200
|
Delete(''),
|
|
198
201
|
Security('*', ['acl']),
|
|
199
202
|
SuccessResponse(noContentResp.status, noContentResp.description)
|
|
200
203
|
], TaskController.prototype, "deleteTasks", null);
|
|
201
204
|
__decorate([
|
|
205
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
202
206
|
Delete('{id}'),
|
|
203
207
|
Middlewares(acl({
|
|
204
208
|
resource: 'task',
|
|
@@ -213,6 +217,7 @@ __decorate([
|
|
|
213
217
|
], TaskController.prototype, "deleteTask", null);
|
|
214
218
|
__decorate([
|
|
215
219
|
Example(taskLocation),
|
|
220
|
+
Extension('x-mcp-exposure', 'confirm'),
|
|
216
221
|
Post('{id}/actions/abort'),
|
|
217
222
|
Middlewares(acl({
|
|
218
223
|
resource: 'task',
|