@xen-orchestra/rest-api 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract-classes/base-controller.mjs +4 -2
- package/dist/abstract-classes/xapi-xo-controller.mjs +2 -6
- package/dist/alarms/alarm.service.mjs +2 -1
- package/dist/backup-jobs/backup-job.controller.mjs +284 -0
- package/dist/backup-jobs/backup-job.service.mjs +25 -0
- package/dist/backup-jobs/backup-job.type.mjs +1 -0
- package/dist/backup-logs/backup-log.controller.mjs +75 -0
- package/dist/backup-logs/backup-log.service.mjs +5 -0
- package/dist/groups/group.controller.mjs +37 -1
- package/dist/helpers/error.helper.mjs +10 -0
- package/dist/hosts/host.controller.mjs +24 -4
- package/dist/hosts/host.service.mjs +6 -7
- package/dist/hosts/host.type.mjs +1 -0
- package/dist/index.mjs +4 -0
- package/dist/ioc/ioc.mjs +36 -0
- package/dist/middlewares/generic-error-handler.middleware.mjs +5 -1
- package/dist/open-api/common/response.common.mjs +8 -0
- package/dist/open-api/oa-examples/backup-job.oa-example.mjs +128 -0
- package/dist/open-api/oa-examples/backup-log.oa-example.mjs +93 -0
- package/dist/open-api/oa-examples/host.oa-example.mjs +30 -0
- package/dist/open-api/oa-examples/pool.oa-example.mjs +30 -0
- package/dist/open-api/oa-examples/proxy.oa-example.mjs +25 -0
- package/dist/open-api/oa-examples/restore-log.oa-example.mjs +53 -0
- package/dist/open-api/oa-examples/task.oa-example.mjs +46 -0
- package/dist/open-api/oa-examples/user.oa-example.mjs +32 -0
- package/dist/open-api/oa-examples/vdi.oa-example.mjs +3 -0
- package/dist/open-api/routes/routes.js +2079 -490
- package/dist/pools/pool.controller.mjs +16 -1
- package/dist/pools/pool.service.mjs +18 -8
- package/dist/proxies/proxy.controller.mjs +61 -0
- package/dist/rest-api/rest-api.mjs +6 -2
- package/dist/restore-logs/restore-log.controller.mjs +144 -0
- package/dist/srs/sr.controller.mjs +39 -2
- package/dist/tasks/task.controller.mjs +167 -0
- package/dist/tasks/task.service.mjs +24 -0
- package/dist/users/user.controller.mjs +91 -12
- package/dist/users/user.service.mjs +21 -0
- package/dist/vdi-snapshots/vdi-snapshot.controller.mjs +46 -4
- package/dist/vdis/vdi.controller.mjs +43 -4
- package/dist/vdis/vdi.service.mjs +21 -0
- package/dist/vm-snapshots/vm-snapshot.controller.mjs +72 -3
- package/dist/vm-templates/vm-template.controller.mjs +43 -2
- package/dist/vms/vm.controller.mjs +135 -5
- package/dist/vms/vm.service.mjs +18 -0
- package/dist/xoa/xoa.service.mjs +14 -4
- package/open-api/spec/swagger.json +11733 -6660
- package/package.json +6 -5
- package/tsconfig.json +1 -0
- package/tsoa.json +27 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createLogger } from '@xen-orchestra/log';
|
|
2
2
|
import { featureUnauthorized, forbiddenOperation, incorrectState, invalidCredentials, invalidParameters, noSuchObject, notImplemented, objectAlreadyExists, unauthorized, } from 'xo-common/api-errors.js';
|
|
3
|
+
import { ApiError } from '../helpers/error.helper.mjs';
|
|
3
4
|
const log = createLogger('xo:rest-api:error-handler');
|
|
4
5
|
// must have 4 parameters to be recognized as an error middleware by express
|
|
5
6
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -14,7 +15,10 @@ export default function genericErrorHandler(error, req, res, _next) {
|
|
|
14
15
|
data: 'data' in error ? error.data : undefined,
|
|
15
16
|
};
|
|
16
17
|
let statusCode;
|
|
17
|
-
if (
|
|
18
|
+
if (error instanceof ApiError) {
|
|
19
|
+
statusCode = error.status;
|
|
20
|
+
}
|
|
21
|
+
else if (noSuchObject.is(error)) {
|
|
18
22
|
statusCode = 404;
|
|
19
23
|
}
|
|
20
24
|
else if (unauthorized.is(error) || forbiddenOperation.is(error)) {
|
|
@@ -39,3 +39,11 @@ export const forbiddenOperationResp = {
|
|
|
39
39
|
status: 403,
|
|
40
40
|
description: 'Forbidden',
|
|
41
41
|
};
|
|
42
|
+
export const badRequestResp = {
|
|
43
|
+
status: 400,
|
|
44
|
+
description: 'Bad request',
|
|
45
|
+
};
|
|
46
|
+
export const incorrectStateResp = {
|
|
47
|
+
status: 409,
|
|
48
|
+
description: 'Incorrect state',
|
|
49
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export const vmBackupJobIds = [
|
|
2
|
+
'/rest/v0/backup-jobs/d33f3dc1-92b4-469c-ad58-4c2a106a4721',
|
|
3
|
+
'/rest/v0/backup-jobs/01d8c371-d8aa-4690-b3f2-e006e07c7681',
|
|
4
|
+
];
|
|
5
|
+
export const metadataBackupJobIds = [
|
|
6
|
+
'/rest/v0/backup-jobs/b50f95fd-f6b7-4027-87b6-6a02c7dcd5f5',
|
|
7
|
+
'/rest/v0/backup-jobs/b49f25fb-f5c1-3377-87b6-6a02c7dbd2c6',
|
|
8
|
+
];
|
|
9
|
+
export const mirrorBackupJobIds = [
|
|
10
|
+
'/rest/v0/backup-jobs/34979df2-2fb3-4a11-8b12-19d9b15f014c',
|
|
11
|
+
'/rest/v0/backup-jobs/e680c14c-ab52-45c8-bb0e-bd4ca12ea8f9',
|
|
12
|
+
];
|
|
13
|
+
export const partialVmBackupJobs = [
|
|
14
|
+
{
|
|
15
|
+
name: 'toto',
|
|
16
|
+
mode: 'full',
|
|
17
|
+
type: 'backup',
|
|
18
|
+
id: 'd33f3dc1-92b4-469c-ad58-4c2a106a4721',
|
|
19
|
+
href: '/rest/v0/backup-jobs/d33f3dc1-92b4-469c-ad58-4c2a106a4721',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'zae',
|
|
23
|
+
mode: 'full',
|
|
24
|
+
type: 'mirrorBackup',
|
|
25
|
+
id: '01d8c371-d8aa-4690-b3f2-e006e07c7681',
|
|
26
|
+
href: '/rest/v0/backup-jobs/01d8c371-d8aa-4690-b3f2-e006e07c7681',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
export const partialMetadataBackupJobs = [
|
|
30
|
+
{
|
|
31
|
+
name: 'another-test',
|
|
32
|
+
xoMetadata: true,
|
|
33
|
+
id: 'b49f25fb-f5c1-3377-87b6-6a02c7dcd5f5',
|
|
34
|
+
href: '/rest/v0/backup-jobs/b49f25fb-f5c1-3377-87b6-6a02c7dcd5f5',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'test',
|
|
38
|
+
xoMetadata: true,
|
|
39
|
+
id: 'b50f95fd-f6b7-4027-87b6-6a02c7dcd5f5',
|
|
40
|
+
href: '/rest/v0/backup-jobs/b50f95fd-f6b7-4027-87b6-6a02c7dcd5f5',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
export const partialMirrorBackupJobs = [
|
|
44
|
+
{
|
|
45
|
+
name: 'tata-bis',
|
|
46
|
+
mode: 'delta',
|
|
47
|
+
id: '34979df2-2fb3-4a11-8b12-19d9b15f014c',
|
|
48
|
+
href: '/rest/v0/backup-jobs/34979df2-2fb3-4a11-8b12-19d9b15f014c',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'tata',
|
|
52
|
+
mode: 'delta',
|
|
53
|
+
id: 'e680c14c-ab52-45c8-bb0e-bd4ca12ea8f9',
|
|
54
|
+
href: '/rest/v0/backup-jobs/e680c14c-ab52-45c8-bb0e-bd4ca12ea8f9',
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
export const vmBackupJob = {
|
|
58
|
+
name: 'toto',
|
|
59
|
+
mode: 'full',
|
|
60
|
+
settings: {
|
|
61
|
+
'': {
|
|
62
|
+
timezone: 'Europe/Paris',
|
|
63
|
+
},
|
|
64
|
+
'7f9f4e0a-30d0-419f-9726-f43d8d55c6fe': {
|
|
65
|
+
snapshotRetention: 1,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
vms: {
|
|
69
|
+
type: 'VM',
|
|
70
|
+
power_state: 'Running',
|
|
71
|
+
},
|
|
72
|
+
type: 'backup',
|
|
73
|
+
remotes: {
|
|
74
|
+
id: {
|
|
75
|
+
__or: [],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
srs: {
|
|
79
|
+
id: {
|
|
80
|
+
__or: [],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
id: 'd33f3dc1-92b4-469c-ad58-4c2a106a4721',
|
|
84
|
+
};
|
|
85
|
+
export const metadataBackupJob = {
|
|
86
|
+
name: 'test',
|
|
87
|
+
remotes: {
|
|
88
|
+
id: '1af95910-01b4-4e87-9c2f-d895cafe0776',
|
|
89
|
+
},
|
|
90
|
+
settings: {
|
|
91
|
+
'7653af2d-c9c6-4b31-9cbc-fdb5f296c4e5': {
|
|
92
|
+
retentionXoMetadata: 1,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
xoMetadata: true,
|
|
96
|
+
userId: 'e531b8c9-3876-4ed9-8fd2-0476d5f825c9',
|
|
97
|
+
type: 'metadataBackup',
|
|
98
|
+
id: 'b50f95fd-f6b7-4027-87b6-6a02c7dcd5f5',
|
|
99
|
+
};
|
|
100
|
+
export const mirrorBackupJob = {
|
|
101
|
+
name: 'tata',
|
|
102
|
+
mode: 'delta',
|
|
103
|
+
sourceRemote: '1af95910-01b4-4e87-9c2f-d895cafe0776',
|
|
104
|
+
remotes: {
|
|
105
|
+
id: {
|
|
106
|
+
__or: ['1af95910-01b4-4e87-9c2f-d895cafe0776', '4d4c8be8-5815-42af-82ad-b413d45b2d38'],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
settings: {
|
|
110
|
+
'8f34ee22-9b3b-4c70-a776-920c533e4844': {
|
|
111
|
+
exportRetention: 1,
|
|
112
|
+
healthCheckVmsWithTags: ['aze'],
|
|
113
|
+
healthCheckSr: 'c787b75c-3e0d-70fa-d0c3-cbfd382d7e33',
|
|
114
|
+
},
|
|
115
|
+
'': {
|
|
116
|
+
concurrency: 1,
|
|
117
|
+
nRetriesVmBackupFailures: 1,
|
|
118
|
+
timeout: 3600000,
|
|
119
|
+
maxExportRate: 1048576,
|
|
120
|
+
backupReportTpl: 'compactMjml',
|
|
121
|
+
hideSuccessfulItems: true,
|
|
122
|
+
reportWhen: 'failure',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
type: 'mirrorBackup',
|
|
126
|
+
proxy: '83050a39-44e2-4e59-b612-860250ce9338',
|
|
127
|
+
id: 'e680c14c-ab52-45c8-bb0e-bd4ca12ea8f9',
|
|
128
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export const backupLogIds = ['/rest/v0/backup-logs/1753776067468', '/rest/v0/backup-logs/1753776157641'];
|
|
2
|
+
export const partialBackupLogs = [
|
|
3
|
+
{
|
|
4
|
+
jobName: 'test-full',
|
|
5
|
+
status: 'success',
|
|
6
|
+
data: {
|
|
7
|
+
mode: 'full',
|
|
8
|
+
reportWhen: 'failure',
|
|
9
|
+
},
|
|
10
|
+
href: '/rest/v0/backup-logs/1753776067468',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
jobName: 'test-full',
|
|
14
|
+
status: 'success',
|
|
15
|
+
data: {
|
|
16
|
+
mode: 'full',
|
|
17
|
+
reportWhen: 'failure',
|
|
18
|
+
},
|
|
19
|
+
href: '/rest/v0/backup-logs/1753776157641',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export const backupLog = {
|
|
23
|
+
data: {
|
|
24
|
+
mode: 'full',
|
|
25
|
+
reportWhen: 'failure',
|
|
26
|
+
},
|
|
27
|
+
id: '1753776067468',
|
|
28
|
+
jobId: '59af07fc-e82c-43b5-8137-026832f30166',
|
|
29
|
+
jobName: 'test-modal',
|
|
30
|
+
message: 'backup',
|
|
31
|
+
scheduleId: '1c7cfc78-a006-4942-aab6-b4c825ce9a4e',
|
|
32
|
+
start: 1753776067468,
|
|
33
|
+
status: 'success',
|
|
34
|
+
infos: [
|
|
35
|
+
{
|
|
36
|
+
data: {
|
|
37
|
+
vms: ['db822c15-6f7d-8920-10bd-68d40fb12ac6'],
|
|
38
|
+
},
|
|
39
|
+
message: 'vms',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
tasks: [
|
|
43
|
+
{
|
|
44
|
+
data: {
|
|
45
|
+
type: 'VM',
|
|
46
|
+
id: 'db822c15-6f7d-8920-10bd-68d40fb12ac6',
|
|
47
|
+
name_label: 'MRA alpine',
|
|
48
|
+
},
|
|
49
|
+
id: '1753776071015',
|
|
50
|
+
message: 'backup VM',
|
|
51
|
+
start: 1753776071015,
|
|
52
|
+
status: 'success',
|
|
53
|
+
tasks: [
|
|
54
|
+
{
|
|
55
|
+
data: {
|
|
56
|
+
id: '1af95910-01b4-4e87-9c2f-d895cafe0776',
|
|
57
|
+
type: 'remote',
|
|
58
|
+
isFull: true,
|
|
59
|
+
},
|
|
60
|
+
id: '1753776072502',
|
|
61
|
+
message: 'export',
|
|
62
|
+
start: 1753776072502,
|
|
63
|
+
status: 'success',
|
|
64
|
+
tasks: [
|
|
65
|
+
{
|
|
66
|
+
id: '1753776072532',
|
|
67
|
+
message: 'transfer',
|
|
68
|
+
start: 1753776072532,
|
|
69
|
+
status: 'success',
|
|
70
|
+
end: 1753776110123,
|
|
71
|
+
result: {
|
|
72
|
+
size: 298260992,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
end: 1753776110134,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: '1753776110440',
|
|
80
|
+
message: 'clean-vm',
|
|
81
|
+
start: 1753776110440,
|
|
82
|
+
status: 'success',
|
|
83
|
+
end: 1753776110453,
|
|
84
|
+
result: {
|
|
85
|
+
merge: false,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
end: 1753776110457,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
end: 1753776110463,
|
|
93
|
+
};
|
|
@@ -776,3 +776,33 @@ export const hostStats = {
|
|
|
776
776
|
},
|
|
777
777
|
};
|
|
778
778
|
export const hostSmt = { enabled: true };
|
|
779
|
+
export const hostMissingPatches = [
|
|
780
|
+
{
|
|
781
|
+
url: 'http://www.samba.org/',
|
|
782
|
+
version: '4.10.16',
|
|
783
|
+
name: 'libsmbclient',
|
|
784
|
+
license: 'GPLv3+ and LGPLv3+',
|
|
785
|
+
changelog: {
|
|
786
|
+
date: 1690286400,
|
|
787
|
+
description: '- resolves: #2222250 - Fix netlogon capabilities level 2',
|
|
788
|
+
author: 'Andreas Schneider <asn@redhat.com> - 4.10.16-25',
|
|
789
|
+
},
|
|
790
|
+
release: '25.el7_9',
|
|
791
|
+
size: 149400,
|
|
792
|
+
description: 'The SMB client library',
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
url: 'http://www.openssh.com/portable.html',
|
|
796
|
+
version: '7.4p1',
|
|
797
|
+
name: 'openssh',
|
|
798
|
+
license: 'BSD',
|
|
799
|
+
changelog: {
|
|
800
|
+
date: 1742212800,
|
|
801
|
+
description: '- Fix CVE-2025-26465 - Fix cases where error codes were not correctly set',
|
|
802
|
+
author: 'Lucas Ravagnier <lucas.ravagnier@vates.tech> - 7.4p1-23.3.2 + 0.10.3-2.23.3.2',
|
|
803
|
+
},
|
|
804
|
+
release: '23.3.2.xcpng8.2',
|
|
805
|
+
size: 429044,
|
|
806
|
+
description: 'An open source implementation of SSH protocol versions 1 and 2',
|
|
807
|
+
},
|
|
808
|
+
];
|
|
@@ -473,3 +473,33 @@ export const poolDashboard = {
|
|
|
473
473
|
percent: 8.333333333333334,
|
|
474
474
|
},
|
|
475
475
|
};
|
|
476
|
+
export const poolMissingPatches = [
|
|
477
|
+
{
|
|
478
|
+
url: 'http://www.samba.org/',
|
|
479
|
+
version: '4.10.16',
|
|
480
|
+
name: 'libsmbclient',
|
|
481
|
+
license: 'GPLv3+ and LGPLv3+',
|
|
482
|
+
changelog: {
|
|
483
|
+
date: 1690286400,
|
|
484
|
+
description: '- resolves: #2222250 - Fix netlogon capabilities level 2',
|
|
485
|
+
author: 'Andreas Schneider <asn@redhat.com> - 4.10.16-25',
|
|
486
|
+
},
|
|
487
|
+
release: '25.el7_9',
|
|
488
|
+
size: 149400,
|
|
489
|
+
description: 'The SMB client library',
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
url: 'http://www.openssh.com/portable.html',
|
|
493
|
+
version: '7.4p1',
|
|
494
|
+
name: 'openssh',
|
|
495
|
+
license: 'BSD',
|
|
496
|
+
changelog: {
|
|
497
|
+
date: 1742212800,
|
|
498
|
+
description: '- Fix CVE-2025-26465 - Fix cases where error codes were not correctly set',
|
|
499
|
+
author: 'Lucas Ravagnier <lucas.ravagnier@vates.tech> - 7.4p1-23.3.2 + 0.10.3-2.23.3.2',
|
|
500
|
+
},
|
|
501
|
+
release: '23.3.2.xcpng8.2',
|
|
502
|
+
size: 429044,
|
|
503
|
+
description: 'An open source implementation of SSH protocol versions 1 and 2',
|
|
504
|
+
},
|
|
505
|
+
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const proxyIds = [
|
|
2
|
+
'/rest/v0/proxies/e625ea0c-a876-405a-b838-109d762efe88',
|
|
3
|
+
'/rest/v0/proxies/17210f70-24f7-4309-bbf7-e6381fdc0b13',
|
|
4
|
+
];
|
|
5
|
+
export const partialProxies = [
|
|
6
|
+
{
|
|
7
|
+
vmUuid: '7330139d-288f-2248-5986-d508ea71f12c',
|
|
8
|
+
id: 'e625ea0c-a876-405a-b838-109d762efe88',
|
|
9
|
+
name: 'Proxy 2025-08-29T08:23:33.394Z',
|
|
10
|
+
href: '/rest/v0/proxies/e625ea0c-a876-405a-b838-109d762efe88',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
vmUuid: '17210f70-24f7-4309-bbf7-e6381fdc0b13',
|
|
14
|
+
id: '88e3ab4d-d74a-495c-8ea2-27307f0c18ad',
|
|
15
|
+
name: 'Proxy 2022-02-13T10:45:32.644Z',
|
|
16
|
+
href: '/rest/v0/proxies/17210f70-24f7-4309-bbf7-e6381fdc0b13',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
export const proxy = {
|
|
20
|
+
name: 'Proxy 2025-08-29T08:23:33.394Z',
|
|
21
|
+
vmUuid: '7330139d-288f-2248-5986-d508ea71f12c',
|
|
22
|
+
id: 'e625ea0c-a876-405a-b838-109d762efe88',
|
|
23
|
+
url: 'https://uxxa-NIAY9W29VlGMrRcKuxx2dsYMTldJo-7l2YnMNQ@10.1.7.238/',
|
|
24
|
+
version: '0.29.29',
|
|
25
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const restoreLogIds = ['/rest/v0/restore/logs/1758180544428', '/rest/v0/restore/logs/1758180544430'];
|
|
2
|
+
export const partialRestoreLogs = [
|
|
3
|
+
{
|
|
4
|
+
status: 'success',
|
|
5
|
+
data: {
|
|
6
|
+
backupId: '1af95910-01b4-4e87-9c2f-d895cafe0776//xo-vm-backups/5ee55483-6659-89b5-9542-afa1d0a0e0cb/20250916T120238Z.json',
|
|
7
|
+
jobId: '33156c65-45e1-431a-bdbb-8c97ae80bd47',
|
|
8
|
+
srId: 'a152347d-e2ca-bec9-2f05-58efe3c1ca61',
|
|
9
|
+
time: 1758024158524,
|
|
10
|
+
},
|
|
11
|
+
href: '/rest/v0/restore-logs/1758180544428',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
status: 'success',
|
|
15
|
+
data: {
|
|
16
|
+
backupId: '1af95910-01b4-4e87-9c2f-d895cafe0776//xo-vm-backups/5ee55483-6659-89b5-9542-afa1d0a0e0cb/20250916T120238Z.json',
|
|
17
|
+
jobId: '33156c65-45e1-431a-bdbb-8c97ae80bd47',
|
|
18
|
+
srId: 'a152347d-e2ca-bec9-2f05-58efe3c1ca61',
|
|
19
|
+
time: 175999999,
|
|
20
|
+
},
|
|
21
|
+
href: '/rest/v0/restore-logs/1758180544430',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
export const restoreLog = {
|
|
25
|
+
data: {
|
|
26
|
+
backupId: '1af95910-01b4-4e87-9c2f-d895cafe0776//xo-vm-backups/5ee55483-6659-89b5-9542-afa1d0a0e0cb/20250916T120238Z.json',
|
|
27
|
+
jobId: '33156c65-45e1-431a-bdbb-8c97ae80bd47',
|
|
28
|
+
srId: 'a152347d-e2ca-bec9-2f05-58efe3c1ca61',
|
|
29
|
+
time: 1758024158524,
|
|
30
|
+
},
|
|
31
|
+
id: '1758180544428',
|
|
32
|
+
message: 'restore',
|
|
33
|
+
start: 1758180544428,
|
|
34
|
+
status: 'success',
|
|
35
|
+
tasks: [
|
|
36
|
+
{
|
|
37
|
+
id: '1758180544486',
|
|
38
|
+
message: 'transfer',
|
|
39
|
+
start: 1758180544486,
|
|
40
|
+
status: 'success',
|
|
41
|
+
end: 1758180852221,
|
|
42
|
+
result: {
|
|
43
|
+
size: 0,
|
|
44
|
+
id: '360bf71a-56a5-eaef-6bcd-ca54c0066a10',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
end: 1758180852221,
|
|
49
|
+
result: {
|
|
50
|
+
size: 0,
|
|
51
|
+
id: '360bf71a-56a5-eaef-6bcd-ca54c0066a10',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -1 +1,47 @@
|
|
|
1
1
|
export const taskLocation = '/rest/v0/tasks/0m7kl0j9l';
|
|
2
|
+
export const taskIds = ['/rest/v0/tasks/0mdd1basu', '/rest/v0/tasks/0mdd1t24g'];
|
|
3
|
+
export const partialTasks = [
|
|
4
|
+
{
|
|
5
|
+
status: 'failure',
|
|
6
|
+
id: '0mdd1basu',
|
|
7
|
+
properties: {
|
|
8
|
+
method: 'xoa.licenses.getSelf',
|
|
9
|
+
params: {},
|
|
10
|
+
name: 'API call: xoa.licenses.getSelf',
|
|
11
|
+
userId: 'e531b8c9-3876-4ed9-8fd2-0476d5f825c9',
|
|
12
|
+
type: 'api.call',
|
|
13
|
+
},
|
|
14
|
+
href: '/rest/v0/tasks/0mdd1basu',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
status: 'failure',
|
|
18
|
+
id: '0mdd1t24g',
|
|
19
|
+
properties: {
|
|
20
|
+
method: 'xoa.licenses.getSelf',
|
|
21
|
+
params: {},
|
|
22
|
+
name: 'API call: xoa.licenses.getSelf',
|
|
23
|
+
userId: 'e531b8c9-3876-4ed9-8fd2-0476d5f825c9',
|
|
24
|
+
type: 'api.call',
|
|
25
|
+
},
|
|
26
|
+
href: '/rest/v0/tasks/0mdd1t24g',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
export const task = {
|
|
30
|
+
id: '0mdd1basu',
|
|
31
|
+
properties: {
|
|
32
|
+
method: 'xoa.licenses.getSelf',
|
|
33
|
+
params: {},
|
|
34
|
+
name: 'API call: xoa.licenses.getSelf',
|
|
35
|
+
userId: 'e531b8c9-3876-4ed9-8fd2-0476d5f825c9',
|
|
36
|
+
type: 'api.call',
|
|
37
|
+
},
|
|
38
|
+
start: 1753098047598,
|
|
39
|
+
status: 'failure',
|
|
40
|
+
updatedAt: 1753098047696,
|
|
41
|
+
end: 1753098047600,
|
|
42
|
+
result: {
|
|
43
|
+
message: 'invalid status closed, expected open',
|
|
44
|
+
name: 'ConnectionError',
|
|
45
|
+
stack: 'ConnectionError: invalid status closed, expected open\n at JsonRpcWebSocketClient._assertStatus (/home/debian/xoa/node_modules/jsonrpc-websocket-client/src/websocket-client.js:141:13)\n at JsonRpcWebSocketClient.send (/home/debian/xoa/node_modules/jsonrpc-websocket-client/src/websocket-client.js:128:10)\n at Peer.<anonymous> (/home/debian/xoa/node_modules/jsonrpc-websocket-client/src/index.js:47:12)\n at Peer.emit (node:events:518:28)\n at Peer.emit (/home/debian/xen-orchestra/@xen-orchestra/log/configure.js:52:17)\n at Peer.push (/home/debian/xoa/node_modules/json-rpc-peer/src/index.js:196:52)\n at /home/debian/xoa/node_modules/json-rpc-peer/src/index.js:142:12\n at Promise._execute (/home/debian/xen-orchestra/node_modules/bluebird/js/release/debuggability.js:384:9)\n at Promise._resolveFromExecutor (/home/debian/xen-orchestra/node_modules/bluebird/js/release/promise.js:518:18)\n at new Promise (/home/debian/xen-orchestra/node_modules/bluebird/js/release/promise.js:103:10)\n at Peer.request (/home/debian/xoa/node_modules/json-rpc-peer/src/index.js:139:12)\n at JsonRpcWebSocketClient.call (/home/debian/xoa/node_modules/jsonrpc-websocket-client/src/index.js:63:23)\n at Xoa.apply [as _getSelfLicenses] (/home/debian/xoa/packages/xo-server-xoa/src/index.js:929:26)\n at Xo.call (file:///home/debian/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:269:25)\n at file:///home/debian/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:421:33\n at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)\n at Task.runInside (/home/debian/xen-orchestra/@vates/task/index.js:175:41)\n at Task.run (/home/debian/xen-orchestra/@vates/task/index.js:159:31)\n at run (file:///home/debian/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:421:16)\n at Api.#callApiMethod (file:///home/debian/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:469:24)',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -25,3 +25,35 @@ export const user = {
|
|
|
25
25
|
id: '722d17b9-699b-49d2-8193-be1ac573d3de',
|
|
26
26
|
};
|
|
27
27
|
export const userId = { id: '722d17b9-699b-49d2-8193-be1ac573d3de' };
|
|
28
|
+
export const authenticationTokens = [
|
|
29
|
+
{
|
|
30
|
+
client: {
|
|
31
|
+
id: 'w574r066b5',
|
|
32
|
+
},
|
|
33
|
+
created_at: 1754383334192,
|
|
34
|
+
description: 'xo-cli@0.32.2 - fedora-2.home - Linux x86_64',
|
|
35
|
+
user_id: '722d17b9-699b-49d2-8193-be1ac573d3de',
|
|
36
|
+
expiration: 1756975334192,
|
|
37
|
+
last_uses: {
|
|
38
|
+
'::1': {
|
|
39
|
+
timestamp: 1754383346794,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
id: 'LB_DqCNhcmAoyiioNnajySHIYHrWfsIhYSYn3n8FfJA',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
client: {
|
|
46
|
+
id: 'nemyw6m3dx',
|
|
47
|
+
},
|
|
48
|
+
created_at: 1754471974241,
|
|
49
|
+
description: 'Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0',
|
|
50
|
+
user_id: '722d17b9-699b-49d2-8193-be1ac573d3de',
|
|
51
|
+
expiration: 1754507974241,
|
|
52
|
+
last_uses: {
|
|
53
|
+
'::ffff:127.0.0.1': {
|
|
54
|
+
timestamp: 1754475904704,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
id: 'ktdlq-BX_GdS5N8MR0v7QIuoSymBw4Ys4EOxsOdqpnE',
|
|
58
|
+
},
|
|
59
|
+
];
|
|
@@ -2,6 +2,9 @@ export const vdiIds = [
|
|
|
2
2
|
'/rest/v0/vdis/5e13f673-760e-41be-826e-620d16b7f43b',
|
|
3
3
|
'/rest/v0/vdis/771d5baf-4364-42f9-8c92-8e5fe08b332a',
|
|
4
4
|
];
|
|
5
|
+
export const vdiId = {
|
|
6
|
+
id: '5e13f673-760e-41be-826e-620d16b7f43b',
|
|
7
|
+
};
|
|
5
8
|
export const partialVdis = [
|
|
6
9
|
{
|
|
7
10
|
type: 'VDI',
|