@xen-orchestra/rest-api 0.23.0 → 0.24.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.
|
@@ -503,6 +503,11 @@ const models = {
|
|
|
503
503
|
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "$SR": { "dataType": "string", "required": true }, "$VBDs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "VDI_type": { "ref": "VDI_TYPE", "required": true }, "cbt_enabled": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "current_operations": { "ref": "Record_string.VDI_OPERATIONS_", "required": true }, "missing": { "dataType": "boolean", "required": true }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "other_config": { "ref": "Record_string.string_", "required": true }, "parent": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "image_format": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "double", "required": true }, "snapshots": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "usage": { "dataType": "double", "required": true }, "id": { "dataType": "string", "required": true }, "type": { "dataType": "enum", "enums": ["VDI"], "required": true } }, "validators": {} },
|
|
504
504
|
},
|
|
505
505
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
506
|
+
"CreateActionReturnType__id-Unbrand_XoVdi__91_id_93___": {
|
|
507
|
+
"dataType": "refAlias",
|
|
508
|
+
"type": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "taskId": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "id": { "dataType": "string", "required": true } } }], "validators": {} },
|
|
509
|
+
},
|
|
510
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
506
511
|
"Unbrand_XoVdiSnapshot_": {
|
|
507
512
|
"dataType": "refAlias",
|
|
508
513
|
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "$SR": { "dataType": "string", "required": true }, "$VBDs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "VDI_type": { "ref": "VDI_TYPE", "required": true }, "cbt_enabled": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "current_operations": { "ref": "Record_string.VDI_OPERATIONS_", "required": true }, "missing": { "dataType": "boolean", "required": true }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "other_config": { "ref": "Record_string.string_", "required": true }, "parent": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "image_format": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "double", "required": true }, "snapshots": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "usage": { "dataType": "double", "required": true }, "id": { "dataType": "string", "required": true }, "snapshot_time": { "dataType": "double", "required": true }, "$snapshot_of": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "enum", "enums": ["VDI-snapshot"], "required": true } }, "validators": {} },
|
|
@@ -3288,6 +3293,35 @@ export function RegisterRoutes(app) {
|
|
|
3288
3293
|
}
|
|
3289
3294
|
});
|
|
3290
3295
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3296
|
+
const argsVdiController_migrateVdi = {
|
|
3297
|
+
id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
|
|
3298
|
+
body: { "in": "body", "name": "body", "required": true, "dataType": "nestedObjectLiteral", "nestedProperties": { "srId": { "dataType": "string", "required": true } } },
|
|
3299
|
+
sync: { "in": "query", "name": "sync", "dataType": "boolean" },
|
|
3300
|
+
};
|
|
3301
|
+
app.post('/rest/v0/vdis/:id/actions/migrate', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VdiController)), ...(fetchMiddlewares(VdiController.prototype.migrateVdi)), async function VdiController_migrateVdi(request, response, next) {
|
|
3302
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3303
|
+
let validatedArgs = [];
|
|
3304
|
+
try {
|
|
3305
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsVdiController_migrateVdi, request, response });
|
|
3306
|
+
const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
|
|
3307
|
+
const controller = await container.get(VdiController);
|
|
3308
|
+
if (typeof controller['setStatus'] === 'function') {
|
|
3309
|
+
controller.setStatus(undefined);
|
|
3310
|
+
}
|
|
3311
|
+
await templateService.apiHandler({
|
|
3312
|
+
methodName: 'migrateVdi',
|
|
3313
|
+
controller,
|
|
3314
|
+
response,
|
|
3315
|
+
next,
|
|
3316
|
+
validatedArgs,
|
|
3317
|
+
successStatus: 202,
|
|
3318
|
+
});
|
|
3319
|
+
}
|
|
3320
|
+
catch (err) {
|
|
3321
|
+
return next(err);
|
|
3322
|
+
}
|
|
3323
|
+
});
|
|
3324
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3291
3325
|
const argsVdiController_putVdiTag = {
|
|
3292
3326
|
id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
|
|
3293
3327
|
tag: { "in": "path", "name": "tag", "required": true, "dataType": "string" },
|
|
@@ -3818,6 +3852,62 @@ export function RegisterRoutes(app) {
|
|
|
3818
3852
|
}
|
|
3819
3853
|
});
|
|
3820
3854
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3855
|
+
const argsVbdController_connectVbd = {
|
|
3856
|
+
id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
|
|
3857
|
+
sync: { "in": "query", "name": "sync", "dataType": "boolean" },
|
|
3858
|
+
};
|
|
3859
|
+
app.post('/rest/v0/vbds/:id/actions/connect', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VbdController)), ...(fetchMiddlewares(VbdController.prototype.connectVbd)), async function VbdController_connectVbd(request, response, next) {
|
|
3860
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3861
|
+
let validatedArgs = [];
|
|
3862
|
+
try {
|
|
3863
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsVbdController_connectVbd, request, response });
|
|
3864
|
+
const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
|
|
3865
|
+
const controller = await container.get(VbdController);
|
|
3866
|
+
if (typeof controller['setStatus'] === 'function') {
|
|
3867
|
+
controller.setStatus(undefined);
|
|
3868
|
+
}
|
|
3869
|
+
await templateService.apiHandler({
|
|
3870
|
+
methodName: 'connectVbd',
|
|
3871
|
+
controller,
|
|
3872
|
+
response,
|
|
3873
|
+
next,
|
|
3874
|
+
validatedArgs,
|
|
3875
|
+
successStatus: 202,
|
|
3876
|
+
});
|
|
3877
|
+
}
|
|
3878
|
+
catch (err) {
|
|
3879
|
+
return next(err);
|
|
3880
|
+
}
|
|
3881
|
+
});
|
|
3882
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3883
|
+
const argsVbdController_disconnectVbd = {
|
|
3884
|
+
id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
|
|
3885
|
+
sync: { "in": "query", "name": "sync", "dataType": "boolean" },
|
|
3886
|
+
};
|
|
3887
|
+
app.post('/rest/v0/vbds/:id/actions/disconnect', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VbdController)), ...(fetchMiddlewares(VbdController.prototype.disconnectVbd)), async function VbdController_disconnectVbd(request, response, next) {
|
|
3888
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3889
|
+
let validatedArgs = [];
|
|
3890
|
+
try {
|
|
3891
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsVbdController_disconnectVbd, request, response });
|
|
3892
|
+
const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
|
|
3893
|
+
const controller = await container.get(VbdController);
|
|
3894
|
+
if (typeof controller['setStatus'] === 'function') {
|
|
3895
|
+
controller.setStatus(undefined);
|
|
3896
|
+
}
|
|
3897
|
+
await templateService.apiHandler({
|
|
3898
|
+
methodName: 'disconnectVbd',
|
|
3899
|
+
controller,
|
|
3900
|
+
response,
|
|
3901
|
+
next,
|
|
3902
|
+
validatedArgs,
|
|
3903
|
+
successStatus: 202,
|
|
3904
|
+
});
|
|
3905
|
+
}
|
|
3906
|
+
catch (err) {
|
|
3907
|
+
return next(err);
|
|
3908
|
+
}
|
|
3909
|
+
});
|
|
3910
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
3821
3911
|
const argsUserController_getUsers = {
|
|
3822
3912
|
req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
|
|
3823
3913
|
fields: { "in": "query", "name": "fields", "dataType": "string" },
|
|
@@ -15,13 +15,13 @@ import { provide } from 'inversify-binding-decorators';
|
|
|
15
15
|
import { AlarmService } from '../alarms/alarm.service.mjs';
|
|
16
16
|
import { escapeUnsafeComplexMatcher } from '../helpers/utils.helper.mjs';
|
|
17
17
|
import { genericAlarmsExample } from '../open-api/oa-examples/alarm.oa-example.mjs';
|
|
18
|
-
import { badRequestResp, createdResp, invalidParameters, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
18
|
+
import { asynchronousActionResp, badRequestResp, createdResp, internalServerErrorResp, invalidParameters, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
19
19
|
import { BASE_URL } from '../index.mjs';
|
|
20
20
|
import { partialVbds, vbd, vbdId, vbdIds } from '../open-api/oa-examples/vbd.oa-example.mjs';
|
|
21
21
|
import { RestApi } from '../rest-api/rest-api.mjs';
|
|
22
22
|
import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
|
|
23
23
|
import { messageIds, partialMessages } from '../open-api/oa-examples/message.oa-example.mjs';
|
|
24
|
-
import { taskIds, partialTasks } from '../open-api/oa-examples/task.oa-example.mjs';
|
|
24
|
+
import { taskIds, taskLocation, partialTasks } from '../open-api/oa-examples/task.oa-example.mjs';
|
|
25
25
|
let VbdController = class VbdController extends XapiXoController {
|
|
26
26
|
#alarmService;
|
|
27
27
|
constructor(restApi, alarmService) {
|
|
@@ -113,6 +113,44 @@ let VbdController = class VbdController extends XapiXoController {
|
|
|
113
113
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
114
114
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Hotplug the VBD, dynamically attaching it to the running VM
|
|
118
|
+
* @example id "f07ab729-c0e8-721c-45ec-f11276377030"
|
|
119
|
+
*/
|
|
120
|
+
connectVbd(id, sync) {
|
|
121
|
+
const vbdId = id;
|
|
122
|
+
const action = async () => {
|
|
123
|
+
const xapiVbd = this.getXapiObject(vbdId);
|
|
124
|
+
await xapiVbd.$xapi.callAsync('VBD.plug', xapiVbd.$ref);
|
|
125
|
+
};
|
|
126
|
+
return this.createAction(action, {
|
|
127
|
+
sync,
|
|
128
|
+
statusCode: noContentResp.status,
|
|
129
|
+
taskProperties: {
|
|
130
|
+
name: 'connect VBD',
|
|
131
|
+
objectId: vbdId,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Hot-unplug the VBD, dynamically detaching it from the running VM
|
|
137
|
+
* @example id "f07ab729-c0e8-721c-45ec-f11276377030"
|
|
138
|
+
*/
|
|
139
|
+
disconnectVbd(id, sync) {
|
|
140
|
+
const vbdId = id;
|
|
141
|
+
const action = async () => {
|
|
142
|
+
const xapiVbd = this.getXapiObject(vbdId);
|
|
143
|
+
await xapiVbd.$xapi.VBD_unplug(xapiVbd.$ref);
|
|
144
|
+
};
|
|
145
|
+
return this.createAction(action, {
|
|
146
|
+
sync,
|
|
147
|
+
statusCode: noContentResp.status,
|
|
148
|
+
taskProperties: {
|
|
149
|
+
name: 'disconnect VBD',
|
|
150
|
+
objectId: vbdId,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
116
154
|
};
|
|
117
155
|
__decorate([
|
|
118
156
|
Example(vbdId),
|
|
@@ -183,6 +221,26 @@ __decorate([
|
|
|
183
221
|
__param(4, Query()),
|
|
184
222
|
__param(5, Query())
|
|
185
223
|
], VbdController.prototype, "getVbdTasks", null);
|
|
224
|
+
__decorate([
|
|
225
|
+
Example(taskLocation),
|
|
226
|
+
Post('{id}/actions/connect'),
|
|
227
|
+
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
228
|
+
Response(noContentResp.status, noContentResp.description),
|
|
229
|
+
Response(notFoundResp.status, notFoundResp.description),
|
|
230
|
+
Response(internalServerErrorResp.status, internalServerErrorResp.description),
|
|
231
|
+
__param(0, Path()),
|
|
232
|
+
__param(1, Query())
|
|
233
|
+
], VbdController.prototype, "connectVbd", null);
|
|
234
|
+
__decorate([
|
|
235
|
+
Example(taskLocation),
|
|
236
|
+
Post('{id}/actions/disconnect'),
|
|
237
|
+
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
238
|
+
Response(noContentResp.status, noContentResp.description),
|
|
239
|
+
Response(notFoundResp.status, notFoundResp.description),
|
|
240
|
+
Response(internalServerErrorResp.status, internalServerErrorResp.description),
|
|
241
|
+
__param(0, Path()),
|
|
242
|
+
__param(1, Query())
|
|
243
|
+
], VbdController.prototype, "disconnectVbd", null);
|
|
186
244
|
VbdController = __decorate([
|
|
187
245
|
Route('vbds'),
|
|
188
246
|
Security('*'),
|
|
@@ -7,19 +7,20 @@ 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 { Body, Delete, Example, 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
|
+
import { json } from 'express';
|
|
13
14
|
import { AlarmService } from '../alarms/alarm.service.mjs';
|
|
14
15
|
import { escapeUnsafeComplexMatcher } from '../helpers/utils.helper.mjs';
|
|
15
16
|
import { genericAlarmsExample } from '../open-api/oa-examples/alarm.oa-example.mjs';
|
|
16
|
-
import { badRequestResp, internalServerErrorResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
17
|
+
import { asynchronousActionResp, badRequestResp, internalServerErrorResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
|
|
17
18
|
import { RestApi } from '../rest-api/rest-api.mjs';
|
|
18
19
|
import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
|
|
19
|
-
import { partialVdis, vdi, vdiIds } from '../open-api/oa-examples/vdi.oa-example.mjs';
|
|
20
|
+
import { partialVdis, vdi, vdiId, vdiIds } from '../open-api/oa-examples/vdi.oa-example.mjs';
|
|
20
21
|
import { VdiService } from './vdi.service.mjs';
|
|
21
22
|
import { messageIds, partialMessages } from '../open-api/oa-examples/message.oa-example.mjs';
|
|
22
|
-
import { taskIds, partialTasks } from '../open-api/oa-examples/task.oa-example.mjs';
|
|
23
|
+
import { taskIds, partialTasks, taskLocation } from '../open-api/oa-examples/task.oa-example.mjs';
|
|
23
24
|
let VdiController = class VdiController extends XapiXoController {
|
|
24
25
|
#alarmService;
|
|
25
26
|
#vdiService;
|
|
@@ -110,6 +111,27 @@ let VdiController = class VdiController extends XapiXoController {
|
|
|
110
111
|
const tasks = await this.getTasksForObject(id, { filter, limit });
|
|
111
112
|
return this.sendObjects(Object.values(tasks), req, 'tasks');
|
|
112
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Migrate a VDI to another SR.
|
|
116
|
+
*
|
|
117
|
+
* Note: After migration, the VDI will have a new ID. The new ID is returned in the response.
|
|
118
|
+
*
|
|
119
|
+
* @example id "c77f9955-c1d2-4b39-aa1c-73cdb2dacb7e"
|
|
120
|
+
* @example body { "srId": "4cb0d74e-a7c1-0b7d-46e3-09382c012abb" }
|
|
121
|
+
*/
|
|
122
|
+
async migrateVdi(id, body, sync) {
|
|
123
|
+
const vdiId = id;
|
|
124
|
+
return this.createAction(async () => {
|
|
125
|
+
const newVdi = await this.getXapi(vdiId).moveVdi(vdiId, body.srId);
|
|
126
|
+
return { id: newVdi.uuid };
|
|
127
|
+
}, {
|
|
128
|
+
sync,
|
|
129
|
+
taskProperties: {
|
|
130
|
+
name: 'migrate VDI',
|
|
131
|
+
objectId: vdiId,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
113
135
|
/**
|
|
114
136
|
* @example id "c77f9955-c1d2-4b39-aa1c-73cdb2dacb7e"
|
|
115
137
|
* @example tag "from-rest-api"
|
|
@@ -206,6 +228,19 @@ __decorate([
|
|
|
206
228
|
__param(4, Query()),
|
|
207
229
|
__param(5, Query())
|
|
208
230
|
], VdiController.prototype, "getVdiTasks", null);
|
|
231
|
+
__decorate([
|
|
232
|
+
Example(taskLocation),
|
|
233
|
+
Example(vdiId),
|
|
234
|
+
Post('{id}/actions/migrate'),
|
|
235
|
+
Middlewares(json()),
|
|
236
|
+
SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
|
|
237
|
+
Response(200, 'Ok'),
|
|
238
|
+
Response(notFoundResp.status, notFoundResp.description),
|
|
239
|
+
Response(internalServerErrorResp.status, internalServerErrorResp.description),
|
|
240
|
+
__param(0, Path()),
|
|
241
|
+
__param(1, Body()),
|
|
242
|
+
__param(2, Query())
|
|
243
|
+
], VdiController.prototype, "migrateVdi", null);
|
|
209
244
|
__decorate([
|
|
210
245
|
Put('{id}/tags/{tag}'),
|
|
211
246
|
SuccessResponse(noContentResp.status, noContentResp.description),
|
|
@@ -5671,6 +5671,32 @@
|
|
|
5671
5671
|
],
|
|
5672
5672
|
"type": "object"
|
|
5673
5673
|
},
|
|
5674
|
+
"CreateActionReturnType__id-Unbrand_XoVdi__91_id_93___": {
|
|
5675
|
+
"anyOf": [
|
|
5676
|
+
{
|
|
5677
|
+
"properties": {
|
|
5678
|
+
"taskId": {
|
|
5679
|
+
"type": "string"
|
|
5680
|
+
}
|
|
5681
|
+
},
|
|
5682
|
+
"required": [
|
|
5683
|
+
"taskId"
|
|
5684
|
+
],
|
|
5685
|
+
"type": "object"
|
|
5686
|
+
},
|
|
5687
|
+
{
|
|
5688
|
+
"properties": {
|
|
5689
|
+
"id": {
|
|
5690
|
+
"type": "string"
|
|
5691
|
+
}
|
|
5692
|
+
},
|
|
5693
|
+
"required": [
|
|
5694
|
+
"id"
|
|
5695
|
+
],
|
|
5696
|
+
"type": "object"
|
|
5697
|
+
}
|
|
5698
|
+
]
|
|
5699
|
+
},
|
|
5674
5700
|
"Unbrand_XoVdiSnapshot_": {
|
|
5675
5701
|
"properties": {
|
|
5676
5702
|
"$pool": {
|
|
@@ -12026,7 +12052,7 @@
|
|
|
12026
12052
|
},
|
|
12027
12053
|
"info": {
|
|
12028
12054
|
"title": "@xen-orchestra/rest-api",
|
|
12029
|
-
"version": "0.
|
|
12055
|
+
"version": "0.24.0",
|
|
12030
12056
|
"description": "REST API to manage your XOA",
|
|
12031
12057
|
"license": {
|
|
12032
12058
|
"name": "AGPL-3.0-or-later"
|
|
@@ -18981,6 +19007,99 @@
|
|
|
18981
19007
|
]
|
|
18982
19008
|
}
|
|
18983
19009
|
},
|
|
19010
|
+
"/vdis/{id}/actions/migrate": {
|
|
19011
|
+
"post": {
|
|
19012
|
+
"operationId": "MigrateVdi",
|
|
19013
|
+
"responses": {
|
|
19014
|
+
"200": {
|
|
19015
|
+
"description": "Ok"
|
|
19016
|
+
},
|
|
19017
|
+
"202": {
|
|
19018
|
+
"description": "Action executed asynchronously",
|
|
19019
|
+
"content": {
|
|
19020
|
+
"application/json": {
|
|
19021
|
+
"schema": {
|
|
19022
|
+
"$ref": "#/components/schemas/CreateActionReturnType__id-Unbrand_XoVdi__91_id_93___"
|
|
19023
|
+
},
|
|
19024
|
+
"examples": {
|
|
19025
|
+
"Example 1": {
|
|
19026
|
+
"value": {
|
|
19027
|
+
"taskId": "0m7kl0j9l"
|
|
19028
|
+
}
|
|
19029
|
+
},
|
|
19030
|
+
"Example 2": {
|
|
19031
|
+
"value": {
|
|
19032
|
+
"id": "5e13f673-760e-41be-826e-620d16b7f43b"
|
|
19033
|
+
}
|
|
19034
|
+
}
|
|
19035
|
+
}
|
|
19036
|
+
}
|
|
19037
|
+
}
|
|
19038
|
+
},
|
|
19039
|
+
"400": {
|
|
19040
|
+
"description": "Bad request"
|
|
19041
|
+
},
|
|
19042
|
+
"401": {
|
|
19043
|
+
"description": "Authentication required"
|
|
19044
|
+
},
|
|
19045
|
+
"404": {
|
|
19046
|
+
"description": "Resource not found"
|
|
19047
|
+
},
|
|
19048
|
+
"500": {
|
|
19049
|
+
"description": "Internal server error, XenServer/XCP-ng error"
|
|
19050
|
+
}
|
|
19051
|
+
},
|
|
19052
|
+
"description": "Migrate a VDI to another SR.\n\nNote: After migration, the VDI will have a new ID. The new ID is returned in the response.",
|
|
19053
|
+
"tags": [
|
|
19054
|
+
"vdis"
|
|
19055
|
+
],
|
|
19056
|
+
"security": [
|
|
19057
|
+
{
|
|
19058
|
+
"*": []
|
|
19059
|
+
}
|
|
19060
|
+
],
|
|
19061
|
+
"parameters": [
|
|
19062
|
+
{
|
|
19063
|
+
"in": "path",
|
|
19064
|
+
"name": "id",
|
|
19065
|
+
"required": true,
|
|
19066
|
+
"schema": {
|
|
19067
|
+
"type": "string"
|
|
19068
|
+
},
|
|
19069
|
+
"example": "c77f9955-c1d2-4b39-aa1c-73cdb2dacb7e"
|
|
19070
|
+
},
|
|
19071
|
+
{
|
|
19072
|
+
"in": "query",
|
|
19073
|
+
"name": "sync",
|
|
19074
|
+
"required": false,
|
|
19075
|
+
"schema": {
|
|
19076
|
+
"type": "boolean"
|
|
19077
|
+
}
|
|
19078
|
+
}
|
|
19079
|
+
],
|
|
19080
|
+
"requestBody": {
|
|
19081
|
+
"required": true,
|
|
19082
|
+
"content": {
|
|
19083
|
+
"application/json": {
|
|
19084
|
+
"schema": {
|
|
19085
|
+
"properties": {
|
|
19086
|
+
"srId": {
|
|
19087
|
+
"type": "string"
|
|
19088
|
+
}
|
|
19089
|
+
},
|
|
19090
|
+
"required": [
|
|
19091
|
+
"srId"
|
|
19092
|
+
],
|
|
19093
|
+
"type": "object"
|
|
19094
|
+
},
|
|
19095
|
+
"example": {
|
|
19096
|
+
"srId": "4cb0d74e-a7c1-0b7d-46e3-09382c012abb"
|
|
19097
|
+
}
|
|
19098
|
+
}
|
|
19099
|
+
}
|
|
19100
|
+
}
|
|
19101
|
+
}
|
|
19102
|
+
},
|
|
18984
19103
|
"/vdis/{id}/tags/{tag}": {
|
|
18985
19104
|
"put": {
|
|
18986
19105
|
"operationId": "PutVdiTag",
|
|
@@ -20357,6 +20476,140 @@
|
|
|
20357
20476
|
]
|
|
20358
20477
|
}
|
|
20359
20478
|
},
|
|
20479
|
+
"/vbds/{id}/actions/connect": {
|
|
20480
|
+
"post": {
|
|
20481
|
+
"operationId": "ConnectVbd",
|
|
20482
|
+
"responses": {
|
|
20483
|
+
"202": {
|
|
20484
|
+
"description": "Action executed asynchronously",
|
|
20485
|
+
"content": {
|
|
20486
|
+
"application/json": {
|
|
20487
|
+
"schema": {
|
|
20488
|
+
"$ref": "#/components/schemas/CreateActionReturnType_void_"
|
|
20489
|
+
},
|
|
20490
|
+
"examples": {
|
|
20491
|
+
"Example 1": {
|
|
20492
|
+
"value": {
|
|
20493
|
+
"taskId": "0m7kl0j9l"
|
|
20494
|
+
}
|
|
20495
|
+
}
|
|
20496
|
+
}
|
|
20497
|
+
}
|
|
20498
|
+
}
|
|
20499
|
+
},
|
|
20500
|
+
"204": {
|
|
20501
|
+
"description": "No content"
|
|
20502
|
+
},
|
|
20503
|
+
"400": {
|
|
20504
|
+
"description": "Bad request"
|
|
20505
|
+
},
|
|
20506
|
+
"401": {
|
|
20507
|
+
"description": "Authentication required"
|
|
20508
|
+
},
|
|
20509
|
+
"404": {
|
|
20510
|
+
"description": "Resource not found"
|
|
20511
|
+
},
|
|
20512
|
+
"500": {
|
|
20513
|
+
"description": "Internal server error, XenServer/XCP-ng error"
|
|
20514
|
+
}
|
|
20515
|
+
},
|
|
20516
|
+
"description": "Hotplug the VBD, dynamically attaching it to the running VM",
|
|
20517
|
+
"tags": [
|
|
20518
|
+
"vbds"
|
|
20519
|
+
],
|
|
20520
|
+
"security": [
|
|
20521
|
+
{
|
|
20522
|
+
"*": []
|
|
20523
|
+
}
|
|
20524
|
+
],
|
|
20525
|
+
"parameters": [
|
|
20526
|
+
{
|
|
20527
|
+
"in": "path",
|
|
20528
|
+
"name": "id",
|
|
20529
|
+
"required": true,
|
|
20530
|
+
"schema": {
|
|
20531
|
+
"type": "string"
|
|
20532
|
+
},
|
|
20533
|
+
"example": "f07ab729-c0e8-721c-45ec-f11276377030"
|
|
20534
|
+
},
|
|
20535
|
+
{
|
|
20536
|
+
"in": "query",
|
|
20537
|
+
"name": "sync",
|
|
20538
|
+
"required": false,
|
|
20539
|
+
"schema": {
|
|
20540
|
+
"type": "boolean"
|
|
20541
|
+
}
|
|
20542
|
+
}
|
|
20543
|
+
]
|
|
20544
|
+
}
|
|
20545
|
+
},
|
|
20546
|
+
"/vbds/{id}/actions/disconnect": {
|
|
20547
|
+
"post": {
|
|
20548
|
+
"operationId": "DisconnectVbd",
|
|
20549
|
+
"responses": {
|
|
20550
|
+
"202": {
|
|
20551
|
+
"description": "Action executed asynchronously",
|
|
20552
|
+
"content": {
|
|
20553
|
+
"application/json": {
|
|
20554
|
+
"schema": {
|
|
20555
|
+
"$ref": "#/components/schemas/CreateActionReturnType_void_"
|
|
20556
|
+
},
|
|
20557
|
+
"examples": {
|
|
20558
|
+
"Example 1": {
|
|
20559
|
+
"value": {
|
|
20560
|
+
"taskId": "0m7kl0j9l"
|
|
20561
|
+
}
|
|
20562
|
+
}
|
|
20563
|
+
}
|
|
20564
|
+
}
|
|
20565
|
+
}
|
|
20566
|
+
},
|
|
20567
|
+
"204": {
|
|
20568
|
+
"description": "No content"
|
|
20569
|
+
},
|
|
20570
|
+
"400": {
|
|
20571
|
+
"description": "Bad request"
|
|
20572
|
+
},
|
|
20573
|
+
"401": {
|
|
20574
|
+
"description": "Authentication required"
|
|
20575
|
+
},
|
|
20576
|
+
"404": {
|
|
20577
|
+
"description": "Resource not found"
|
|
20578
|
+
},
|
|
20579
|
+
"500": {
|
|
20580
|
+
"description": "Internal server error, XenServer/XCP-ng error"
|
|
20581
|
+
}
|
|
20582
|
+
},
|
|
20583
|
+
"description": "Hot-unplug the VBD, dynamically detaching it from the running VM",
|
|
20584
|
+
"tags": [
|
|
20585
|
+
"vbds"
|
|
20586
|
+
],
|
|
20587
|
+
"security": [
|
|
20588
|
+
{
|
|
20589
|
+
"*": []
|
|
20590
|
+
}
|
|
20591
|
+
],
|
|
20592
|
+
"parameters": [
|
|
20593
|
+
{
|
|
20594
|
+
"in": "path",
|
|
20595
|
+
"name": "id",
|
|
20596
|
+
"required": true,
|
|
20597
|
+
"schema": {
|
|
20598
|
+
"type": "string"
|
|
20599
|
+
},
|
|
20600
|
+
"example": "f07ab729-c0e8-721c-45ec-f11276377030"
|
|
20601
|
+
},
|
|
20602
|
+
{
|
|
20603
|
+
"in": "query",
|
|
20604
|
+
"name": "sync",
|
|
20605
|
+
"required": false,
|
|
20606
|
+
"schema": {
|
|
20607
|
+
"type": "boolean"
|
|
20608
|
+
}
|
|
20609
|
+
}
|
|
20610
|
+
]
|
|
20611
|
+
}
|
|
20612
|
+
},
|
|
20360
20613
|
"/users": {
|
|
20361
20614
|
"get": {
|
|
20362
20615
|
"operationId": "GetUsers",
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
7
7
|
"name": "@xen-orchestra/rest-api",
|
|
8
8
|
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/rest-api",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.24.0",
|
|
10
10
|
"description": "REST API to manage your XOA",
|
|
11
11
|
"license": "AGPL-3.0-or-later",
|
|
12
12
|
"private": false,
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@vates/async-each": "^1.0.1",
|
|
37
37
|
"@vates/task": "^0.6.1",
|
|
38
|
-
"@vates/types": "^1.
|
|
38
|
+
"@vates/types": "^1.18.0",
|
|
39
39
|
"@xen-orchestra/backups": "^0.68.0",
|
|
40
40
|
"@xen-orchestra/log": "^0.7.1",
|
|
41
|
-
"@xen-orchestra/xapi": "^8.6.
|
|
41
|
+
"@xen-orchestra/xapi": "^8.6.5",
|
|
42
42
|
"complex-matcher": "^1.0.0",
|
|
43
43
|
"golike-defer": "^0.5.1",
|
|
44
44
|
"inversify": "^6.2.2",
|