@xen-orchestra/rest-api 0.15.0 → 0.17.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/ioc/ioc.mjs +36 -0
- package/dist/open-api/common/response.common.mjs +4 -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/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/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 +2083 -609
- 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 +49 -3
- 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 +72 -3
- package/dist/vms/vm.controller.mjs +135 -5
- package/dist/vms/vm.service.mjs +18 -0
- package/open-api/spec/swagger.json +8469 -4048
- package/package.json +4 -4
- package/tsoa.json +15 -0
|
@@ -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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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',
|