1
// Copyright 2014 ALTOROS
2
// Licensed under the AGPLv3, see LICENSE file for details.
6
var driveOwner = MakeUserResource("80cb30fb-0ea3-43db-b27b-a125752cc0bf")
8
var drivesData = []Drive{
10
Resource: *MakeDriveResource("2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff"),
15
Resource: *MakeDriveResource("3b30c7ef-1fda-416d-91d1-ba616859360c"),
20
Resource: *MakeDriveResource("464aed14-8604-4277-be3c-9d53151d53b4"),
26
const jsonDrivesData = `{
35
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
36
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
38
"resource_uri": "/api/2.0/drives/2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff/",
39
"status": "unmounted",
40
"uuid": "2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff"
44
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
45
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
47
"resource_uri": "/api/2.0/drives/3b30c7ef-1fda-416d-91d1-ba616859360c/",
48
"status": "unmounted",
49
"uuid": "3b30c7ef-1fda-416d-91d1-ba616859360c"
53
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
54
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
56
"resource_uri": "/api/2.0/drives/464aed14-8604-4277-be3c-9d53151d53b4/",
57
"status": "unmounted",
58
"uuid": "464aed14-8604-4277-be3c-9d53151d53b4"
62
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
63
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
65
"resource_uri": "/api/2.0/drives/47ec5074-6058-4b0f-9505-78c83bd5a88b/",
66
"status": "unmounted",
67
"uuid": "47ec5074-6058-4b0f-9505-78c83bd5a88b"
71
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
72
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
74
"resource_uri": "/api/2.0/drives/7949e52e-c8ba-461b-a84f-3f247221c644/",
75
"status": "unmounted",
76
"uuid": "7949e52e-c8ba-461b-a84f-3f247221c644"
80
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
81
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
83
"resource_uri": "/api/2.0/drives/81b020b0-8ea0-4602-b778-e4df4539f0f7/",
84
"status": "unmounted",
85
"uuid": "81b020b0-8ea0-4602-b778-e4df4539f0f7"
89
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
90
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
92
"resource_uri": "/api/2.0/drives/baf8fed4-757f-4d9e-a23a-3b3ff81e16c4/",
93
"status": "unmounted",
94
"uuid": "baf8fed4-757f-4d9e-a23a-3b3ff81e16c4"
98
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
99
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
101
"resource_uri": "/api/2.0/drives/cae6df75-00a1-490c-a96b-51777b3ec515/",
102
"status": "unmounted",
103
"uuid": "cae6df75-00a1-490c-a96b-51777b3ec515"
107
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
108
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
110
"resource_uri": "/api/2.0/drives/e15dd971-3ef8-497c-9f92-90d5ca1722bd/",
111
"status": "unmounted",
112
"uuid": "e15dd971-3ef8-497c-9f92-90d5ca1722bd"
117
var drivesDetailData = []Drive{
119
Resource: *MakeDriveResource("2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff"),
123
Name: "test_drive_2",
130
Resource: *MakeDriveResource("3b30c7ef-1fda-416d-91d1-ba616859360c"),
132
*MakeJobResource("fbe05708-fd42-43d5-814c-9cb805edd4cb"),
133
*MakeJobResource("32513930-6815-4cd4-ae8e-2eb89733c206"),
145
Resource: *MakeDriveResource("464aed14-8604-4277-be3c-9d53151d53b4"),
149
Name: "test_drive_1",
157
const jsonDrivesDetailData = `{
166
"allow_multimount": false,
172
"name": "test_drive_2",
174
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
175
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
177
"resource_uri": "/api/2.0/drives/2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff/",
179
"is_snapshotable": true,
180
"snapshots_allocated_size": 0,
181
"storage_type": "dssd"
185
"status": "unmounted",
186
"storage_type": "dssd",
188
"uuid": "2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff"
192
"allow_multimount": false,
195
"resource_uri": "/api/2.0/jobs/fbe05708-fd42-43d5-814c-9cb805edd4cb/",
196
"uuid": "fbe05708-fd42-43d5-814c-9cb805edd4cb"
199
"resource_uri": "/api/2.0/jobs/32513930-6815-4cd4-ae8e-2eb89733c206/",
200
"uuid": "32513930-6815-4cd4-ae8e-2eb89733c206"
209
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
210
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
212
"resource_uri": "/api/2.0/drives/3b30c7ef-1fda-416d-91d1-ba616859360c/",
214
"is_snapshotable": true,
215
"snapshots_allocated_size": 0,
216
"storage_type": "dssd"
220
"status": "unmounted",
221
"storage_type": "dssd",
223
"uuid": "3b30c7ef-1fda-416d-91d1-ba616859360c"
227
"allow_multimount": false,
233
"name": "test_drive_1",
235
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
236
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
238
"resource_uri": "/api/2.0/drives/464aed14-8604-4277-be3c-9d53151d53b4/",
240
"is_snapshotable": true,
241
"snapshots_allocated_size": 0,
242
"storage_type": "dssd"
246
"status": "unmounted",
247
"storage_type": "dssd",
249
"uuid": "464aed14-8604-4277-be3c-9d53151d53b4"
253
"allow_multimount": false,
259
"name": "test_drive_4",
261
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
262
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
264
"resource_uri": "/api/2.0/drives/47ec5074-6058-4b0f-9505-78c83bd5a88b/",
266
"is_snapshotable": true,
267
"snapshots_allocated_size": 0,
268
"storage_type": "dssd"
272
"status": "unmounted",
273
"storage_type": "dssd",
275
"uuid": "47ec5074-6058-4b0f-9505-78c83bd5a88b"
279
"allow_multimount": false,
289
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
290
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
292
"resource_uri": "/api/2.0/drives/7949e52e-c8ba-461b-a84f-3f247221c644/",
294
"is_snapshotable": true,
295
"snapshots_allocated_size": 0,
296
"storage_type": "dssd"
300
"status": "unmounted",
301
"storage_type": "dssd",
303
"uuid": "7949e52e-c8ba-461b-a84f-3f247221c644"
307
"allow_multimount": false,
315
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
316
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
318
"resource_uri": "/api/2.0/drives/81b020b0-8ea0-4602-b778-e4df4539f0f7/",
320
"is_snapshotable": false,
321
"snapshots_allocated_size": 0,
322
"storage_type": "zadara"
326
"status": "unmounted",
327
"storage_type": "zadara",
329
"uuid": "81b020b0-8ea0-4602-b778-e4df4539f0f7"
333
"allow_multimount": false,
339
"name": "test_drive_3",
341
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
342
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
344
"resource_uri": "/api/2.0/drives/baf8fed4-757f-4d9e-a23a-3b3ff81e16c4/",
346
"is_snapshotable": true,
347
"snapshots_allocated_size": 0,
348
"storage_type": "dssd"
352
"status": "unmounted",
353
"storage_type": "dssd",
355
"uuid": "baf8fed4-757f-4d9e-a23a-3b3ff81e16c4"
359
"allow_multimount": false,
365
"name": "test_drive_0",
367
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
368
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
370
"resource_uri": "/api/2.0/drives/cae6df75-00a1-490c-a96b-51777b3ec515/",
372
"is_snapshotable": true,
373
"snapshots_allocated_size": 0,
374
"storage_type": "dssd"
378
"status": "unmounted",
379
"storage_type": "dssd",
381
"uuid": "cae6df75-00a1-490c-a96b-51777b3ec515"
385
"allow_multimount": false,
391
"category": "general",
393
"favourite": "False",
394
"image_type": "preinst",
403
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
404
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
406
"resource_uri": "/api/2.0/drives/e15dd971-3ef8-497c-9f92-90d5ca1722bd/",
408
"is_snapshotable": true,
409
"snapshots_allocated_size": 0,
410
"storage_type": "dssd"
414
"status": "unmounted",
415
"storage_type": "dssd",
417
"uuid": "e15dd971-3ef8-497c-9f92-90d5ca1722bd"
422
var driveData = Drive{
423
Resource: *MakeDriveResource("2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff"),
424
Affinities: []string{"123", "321"},
428
Name: "test_drive_2",
435
const jsonDriveData = `{
436
"affinities": ["123","321"],
437
"allow_multimount": false,
443
"name": "test_drive_2",
445
"resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
446
"uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
448
"resource_uri": "/api/2.0/drives/2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff/",
450
"is_snapshotable": true,
451
"snapshots_allocated_size": 0,
452
"storage_type": "dssd"
456
"status": "unmounted",
457
"storage_type": "dssd",
459
"uuid": "2ef7b7c7-7ec4-47a7-9b69-087c9417c0ff"
462
var libraryDriveData = Drive{
463
Resource: *MakeLibDriveResource("22bd1b24-ea78-47bb-a59b-a09ed5407867"),
465
Name: "Debian 7.1.0 Netinstall",
469
LibraryDrive: LibraryDrive{
471
ImageType: "install",
477
const jsonLibraryDriveData = `{
479
"allow_multimount": false,
484
"description": "Debian 7.1.0 Netinstall AMD64.",
486
"image_type": "install",
487
"install_notes": "1. Attach the CD. \\n\r\nPlease be aware that the CD needs to be attached to the server as IDE. \\n\r\n \\n\r\n2. Attach a Drive. \\n\r\nPlease be aware that the minimum drive size where you are going to install the OS should be 5 GB. \\n\r\n \\n\r\n3. Connecting to your server via VNC. \\n\r\na) Go to the \u201cProperties\u201d tab of the server and Turn on the VNC Tunnel by clicking the button right next to it \\n\r\nb) In order to use the inbuilt client click on the icon right next to the VNC link and choose \u201cOpen in Dialog Window\u201d or \u201cOpen in new browser window/tab\u201d \\n\r\nOR \\n\r\nc) Having installed a compatible VNC client, open a VNC connection to your server through the UI. \\n\r\nd) Enter your VNC url and VNC password as displayed on your Server Properties Window. \\n\r\n \\n\r\n4. Minimum Hardware Requirements. \\n\r\nThe recommended minimum hardware requirements as published by debian.org are: 1GB RAM and 1GHz CPU",
493
"name": "Debian 7.1.0 Netinstall",
497
"resource_uri": "/api/2.0/libdrives/22bd1b24-ea78-47bb-a59b-a09ed5407867/",
499
"status": "unmounted",
500
"storage_type": null,
502
"url": "http://debian.org/",
503
"uuid": "22bd1b24-ea78-47bb-a59b-a09ed5407867"