blob: 45c2376d6fc6b7e881678853a0dcfb0259fce42f [file] [log] [blame]
Jamie Hannaford302c0b62015-02-16 14:12:34 +01001package backups
2
Jamie Hannaforde65ad952015-11-16 14:05:11 +01003import "time"
4
5var (
6 timestamp = "2015-11-12T14:22:42Z"
7 timeVal, _ = time.Parse(time.RFC3339, timestamp)
8)
9
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010010var getResp = `
Jamie Hannaforde0524732015-02-16 14:44:13 +010011{
12 "backup": {
Jamie Hannaforde65ad952015-11-16 14:05:11 +010013 "created": "` + timestamp + `",
Jamie Hannaforde0524732015-02-16 14:44:13 +010014 "description": "My Backup",
15 "id": "61f12fef-edb1-4561-8122-e7c00ef26a82",
16 "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
17 "locationRef": null,
18 "name": "snapshot",
19 "parent_id": null,
20 "size": 100,
21 "status": "NEW",
22 "datastore": {
23 "version": "5.1",
24 "type": "MySQL",
25 "version_id": "20000000-0000-0000-0000-000000000002"
26 },
Jamie Hannaforde65ad952015-11-16 14:05:11 +010027 "updated": "` + timestamp + `"
Jamie Hannaforde0524732015-02-16 14:44:13 +010028 }
29}
30`
31
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010032var createReq = `
Jamie Hannaford302c0b62015-02-16 14:12:34 +010033{
34 "backup": {
35 "description": "My Backup",
36 "instance": "d4603f69-ec7e-4e9b-803f-600b9205576f",
37 "name": "snapshot"
38 }
39}
40`
41
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010042var createResp = getResp
Jamie Hannaford302c0b62015-02-16 14:12:34 +010043
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010044var listResp = `
Jamie Hannaford302c0b62015-02-16 14:12:34 +010045{
46 "backups": [
47 {
48 "status": "COMPLETED",
Jamie Hannaforde65ad952015-11-16 14:05:11 +010049 "updated": "` + timestamp + `",
Jamie Hannaford302c0b62015-02-16 14:12:34 +010050 "description": "Backup from Restored Instance",
Jamie Hannaforde0524732015-02-16 14:44:13 +010051 "datastore": {
52 "version": "5.1",
53 "type": "MySQL",
54 "version_id": "20000000-0000-0000-0000-000000000002"
55 },
Jamie Hannaford302c0b62015-02-16 14:12:34 +010056 "id": "87972694-4be2-40f5-83f8-501656e0032a",
57 "size": 0.141026,
58 "name": "restored_backup",
Jamie Hannaforde65ad952015-11-16 14:05:11 +010059 "created": "` + timestamp + `",
Jamie Hannaford302c0b62015-02-16 14:12:34 +010060 "instance_id": "29af2cd9-0674-48ab-b87a-b160f00208e6",
61 "parent_id": null,
62 "locationRef": "http://localhost/path/to/backup"
63 }
64 ]
65}
66`