do_snapshot 0.0.14 → 0.0.15
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.
- checksums.yaml +4 -4
- data/README.md +29 -7
- data/lib/do_snapshot/adapter.rb +21 -0
- data/lib/do_snapshot/adapter/abstract.rb +44 -0
- data/lib/do_snapshot/adapter/digitalocean.rb +133 -0
- data/lib/do_snapshot/adapter/digitalocean_v2.rb +145 -0
- data/lib/do_snapshot/cli.rb +22 -12
- data/lib/do_snapshot/command.rb +7 -8
- data/lib/do_snapshot/version.rb +1 -1
- data/spec/do_snapshot/adapter/abstract_spec.rb +29 -0
- data/spec/do_snapshot/{api_spec.rb → adapter/digitalocean_spec.rb} +4 -3
- data/spec/do_snapshot/adapter/digitalocean_v2_spec.rb +223 -0
- data/spec/do_snapshot/cli_spec.rb +2 -1
- data/spec/do_snapshot/command_spec.rb +5 -8
- data/spec/fixtures/{error_message.json → digitalocean/v1/error_message.json} +0 -0
- data/spec/fixtures/{response_event.json → digitalocean/v1/response_event.json} +0 -0
- data/spec/fixtures/{show_droplet.json → digitalocean/v1/show_droplet.json} +0 -0
- data/spec/fixtures/{show_droplet_inactive.json → digitalocean/v1/show_droplet_inactive.json} +0 -0
- data/spec/fixtures/{show_droplets.json → digitalocean/v1/show_droplets.json} +0 -0
- data/spec/fixtures/{show_droplets_empty.json → digitalocean/v1/show_droplets_empty.json} +0 -0
- data/spec/fixtures/{show_event_done.json → digitalocean/v1/show_event_done.json} +0 -0
- data/spec/fixtures/{show_event_start.json → digitalocean/v1/show_event_start.json} +0 -0
- data/spec/fixtures/digitalocean/v2/empty.json +0 -0
- data/spec/fixtures/digitalocean/v2/error_message.json +4 -0
- data/spec/fixtures/digitalocean/v2/response_event.json +29 -0
- data/spec/fixtures/digitalocean/v2/show_droplet.json +102 -0
- data/spec/fixtures/digitalocean/v2/show_droplet_inactive.json +102 -0
- data/spec/fixtures/digitalocean/v2/show_droplets.json +284 -0
- data/spec/fixtures/digitalocean/v2/show_droplets_empty.json +5 -0
- data/spec/fixtures/digitalocean/v2/show_event_done.json +29 -0
- data/spec/fixtures/digitalocean/v2/show_event_power_off_done.json +29 -0
- data/spec/fixtures/digitalocean/v2/show_event_power_off_start.json +29 -0
- data/spec/fixtures/digitalocean/v2/show_event_power_on_done.json +29 -0
- data/spec/fixtures/digitalocean/v2/show_event_power_on_start.json +29 -0
- data/spec/fixtures/digitalocean/v2/show_event_start.json +29 -0
- data/spec/shared/api_helpers.rb +5 -80
- data/spec/shared/api_v1_helpers.rb +97 -0
- data/spec/shared/api_v2_helpers.rb +152 -0
- data/spec/shared/environment.rb +5 -14
- data/spec/shared/uri_helpers.rb +1 -0
- data/spec/spec_helper.rb +5 -3
- metadata +74 -23
- data/lib/do_snapshot/api.rb +0 -144
|
@@ -4,6 +4,7 @@ require 'spec_helper'
|
|
|
4
4
|
describe DoSnapshot::Command do
|
|
5
5
|
include_context 'spec'
|
|
6
6
|
include_context 'uri_helpers'
|
|
7
|
+
include_context 'api_v1_helpers'
|
|
7
8
|
|
|
8
9
|
subject(:cmd) { DoSnapshot::Command }
|
|
9
10
|
subject(:log) { DoSnapshot::Log }
|
|
@@ -69,8 +70,7 @@ describe DoSnapshot::Command do
|
|
|
69
70
|
it 'when raised with error' do
|
|
70
71
|
stub_droplet_stop_fail(droplet_id)
|
|
71
72
|
load_options
|
|
72
|
-
|
|
73
|
-
droplet = instance.droplet
|
|
73
|
+
droplet = cmd.api.droplet droplet_id
|
|
74
74
|
expect { cmd.stop_droplet(droplet) }
|
|
75
75
|
.to raise_error(DoSnapshot::DropletShutdownError)
|
|
76
76
|
end
|
|
@@ -78,8 +78,7 @@ describe DoSnapshot::Command do
|
|
|
78
78
|
it 'when stopped' do
|
|
79
79
|
stub_droplet_stop(droplet_id)
|
|
80
80
|
load_options
|
|
81
|
-
|
|
82
|
-
droplet = instance.droplet
|
|
81
|
+
droplet = cmd.api.droplet droplet_id
|
|
83
82
|
expect { cmd.stop_droplet(droplet) }
|
|
84
83
|
.not_to raise_error
|
|
85
84
|
end
|
|
@@ -89,8 +88,7 @@ describe DoSnapshot::Command do
|
|
|
89
88
|
it 'when raised with error' do
|
|
90
89
|
stub_droplet_snapshot_fail(droplet_id, snapshot_name)
|
|
91
90
|
load_options
|
|
92
|
-
|
|
93
|
-
droplet = instance.droplet
|
|
91
|
+
droplet = cmd.api.droplet droplet_id
|
|
94
92
|
expect { cmd.create_snapshot(droplet) }
|
|
95
93
|
.to raise_error(DoSnapshot::SnapshotCreateError)
|
|
96
94
|
end
|
|
@@ -98,8 +96,7 @@ describe DoSnapshot::Command do
|
|
|
98
96
|
it 'when snapshot is created' do
|
|
99
97
|
stub_droplet_snapshot(droplet_id, snapshot_name)
|
|
100
98
|
load_options
|
|
101
|
-
|
|
102
|
-
droplet = instance.droplet
|
|
99
|
+
droplet = cmd.api.droplet droplet_id
|
|
103
100
|
expect { cmd.create_snapshot(droplet) }
|
|
104
101
|
.not_to raise_error
|
|
105
102
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/{show_droplet_inactive.json → digitalocean/v1/show_droplet_inactive.json}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"action":{
|
|
3
|
+
"id": 7499,
|
|
4
|
+
"status": "in-progress",
|
|
5
|
+
"type": "snapshot",
|
|
6
|
+
"started_at": "2014-11-14T16:34:39Z",
|
|
7
|
+
"completed_at": null,
|
|
8
|
+
"resource_id": 100823,
|
|
9
|
+
"resource_type": "droplet",
|
|
10
|
+
"region": {
|
|
11
|
+
"name": "Amsterdam 1",
|
|
12
|
+
"slug": "ams1",
|
|
13
|
+
"sizes": [
|
|
14
|
+
"512mb",
|
|
15
|
+
"1gb",
|
|
16
|
+
"4gb",
|
|
17
|
+
"2gb",
|
|
18
|
+
"8gb",
|
|
19
|
+
"16gb"
|
|
20
|
+
],
|
|
21
|
+
"features": [
|
|
22
|
+
"virtio",
|
|
23
|
+
"backups"
|
|
24
|
+
],
|
|
25
|
+
"available": true
|
|
26
|
+
},
|
|
27
|
+
"region_slug": "ams1"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"droplet": {
|
|
3
|
+
"id": 100823,
|
|
4
|
+
"name": "example.com",
|
|
5
|
+
"memory": 512,
|
|
6
|
+
"vcpus": 1,
|
|
7
|
+
"disk": 20,
|
|
8
|
+
"locked": false,
|
|
9
|
+
"status": "active",
|
|
10
|
+
"kernel": {
|
|
11
|
+
"id": 2233,
|
|
12
|
+
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64",
|
|
13
|
+
"version": "2.6.32-358.6.2.el6.x86_64"
|
|
14
|
+
},
|
|
15
|
+
"created_at": "2014-11-14T16:36:31Z",
|
|
16
|
+
"features": [
|
|
17
|
+
"ipv6",
|
|
18
|
+
"virtio"
|
|
19
|
+
],
|
|
20
|
+
"backup_ids": [
|
|
21
|
+
],
|
|
22
|
+
"snapshot_ids": [
|
|
23
|
+
5019770,
|
|
24
|
+
5019903,
|
|
25
|
+
5020783,
|
|
26
|
+
5030783
|
|
27
|
+
],
|
|
28
|
+
"image": {
|
|
29
|
+
"id": 562354,
|
|
30
|
+
"name": "CentOS 6.4 x64",
|
|
31
|
+
"distribution": "CentOS",
|
|
32
|
+
"slug": "centos-6-4-x64",
|
|
33
|
+
"public": false,
|
|
34
|
+
"regions": [
|
|
35
|
+
"nyc1",
|
|
36
|
+
"ams1",
|
|
37
|
+
"sfo1",
|
|
38
|
+
"nyc2",
|
|
39
|
+
"ams2",
|
|
40
|
+
"sgp1",
|
|
41
|
+
"lon1",
|
|
42
|
+
"nyc3",
|
|
43
|
+
"ams3",
|
|
44
|
+
"nyc3",
|
|
45
|
+
"fra1"
|
|
46
|
+
],
|
|
47
|
+
"created_at": "2014-10-17T20:24:33Z",
|
|
48
|
+
"type": "snapshot",
|
|
49
|
+
"min_disk_size": 20
|
|
50
|
+
},
|
|
51
|
+
"size": {
|
|
52
|
+
"slug": "512mb",
|
|
53
|
+
"memory": 512,
|
|
54
|
+
"vcpus": 1,
|
|
55
|
+
"disk": 20,
|
|
56
|
+
"transfer": 1.0,
|
|
57
|
+
"price_monthly": 5.0,
|
|
58
|
+
"price_hourly": 0.00744,
|
|
59
|
+
"regions": [
|
|
60
|
+
"nyc1",
|
|
61
|
+
"sgp1",
|
|
62
|
+
"ams1",
|
|
63
|
+
"sfo1",
|
|
64
|
+
"nyc2",
|
|
65
|
+
"lon1",
|
|
66
|
+
"nyc3",
|
|
67
|
+
"ams3",
|
|
68
|
+
"ams2",
|
|
69
|
+
"fra1"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"size_slug": "512mb",
|
|
73
|
+
"networks": {
|
|
74
|
+
"v4": [
|
|
75
|
+
{
|
|
76
|
+
"ip_address": "104.131.186.241",
|
|
77
|
+
"netmask": "255.255.240.0",
|
|
78
|
+
"gateway": "104.131.176.1",
|
|
79
|
+
"type": "public"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"v6": []
|
|
83
|
+
},
|
|
84
|
+
"region": {
|
|
85
|
+
"name": "Amsterdam 1",
|
|
86
|
+
"slug": "ams1",
|
|
87
|
+
"sizes": [
|
|
88
|
+
"16gb",
|
|
89
|
+
"2gb",
|
|
90
|
+
"1gb",
|
|
91
|
+
"4gb",
|
|
92
|
+
"8gb",
|
|
93
|
+
"512mb"
|
|
94
|
+
],
|
|
95
|
+
"features": [
|
|
96
|
+
"virtio",
|
|
97
|
+
"backups"
|
|
98
|
+
],
|
|
99
|
+
"available": true
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"droplet": {
|
|
3
|
+
"id": 100823,
|
|
4
|
+
"name": "example.com",
|
|
5
|
+
"memory": 512,
|
|
6
|
+
"vcpus": 1,
|
|
7
|
+
"disk": 20,
|
|
8
|
+
"locked": false,
|
|
9
|
+
"status": "off",
|
|
10
|
+
"kernel": {
|
|
11
|
+
"id": 2233,
|
|
12
|
+
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64",
|
|
13
|
+
"version": "2.6.32-358.6.2.el6.x86_64"
|
|
14
|
+
},
|
|
15
|
+
"created_at": "2014-11-14T16:36:31Z",
|
|
16
|
+
"features": [
|
|
17
|
+
"ipv6",
|
|
18
|
+
"virtio"
|
|
19
|
+
],
|
|
20
|
+
"backup_ids": [
|
|
21
|
+
],
|
|
22
|
+
"snapshot_ids": [
|
|
23
|
+
5019770,
|
|
24
|
+
5019903,
|
|
25
|
+
5020783,
|
|
26
|
+
5030783
|
|
27
|
+
],
|
|
28
|
+
"image": {
|
|
29
|
+
"id": 562354,
|
|
30
|
+
"name": "CentOS 6.4 x64",
|
|
31
|
+
"distribution": "CentOS",
|
|
32
|
+
"slug": "centos-6-4-x64",
|
|
33
|
+
"public": false,
|
|
34
|
+
"regions": [
|
|
35
|
+
"nyc1",
|
|
36
|
+
"ams1",
|
|
37
|
+
"sfo1",
|
|
38
|
+
"nyc2",
|
|
39
|
+
"ams2",
|
|
40
|
+
"sgp1",
|
|
41
|
+
"lon1",
|
|
42
|
+
"nyc3",
|
|
43
|
+
"ams3",
|
|
44
|
+
"nyc3",
|
|
45
|
+
"fra1"
|
|
46
|
+
],
|
|
47
|
+
"created_at": "2014-10-17T20:24:33Z",
|
|
48
|
+
"type": "snapshot",
|
|
49
|
+
"min_disk_size": 20
|
|
50
|
+
},
|
|
51
|
+
"size": {
|
|
52
|
+
"slug": "512mb",
|
|
53
|
+
"memory": 512,
|
|
54
|
+
"vcpus": 1,
|
|
55
|
+
"disk": 20,
|
|
56
|
+
"transfer": 1.0,
|
|
57
|
+
"price_monthly": 5.0,
|
|
58
|
+
"price_hourly": 0.00744,
|
|
59
|
+
"regions": [
|
|
60
|
+
"nyc1",
|
|
61
|
+
"sgp1",
|
|
62
|
+
"ams1",
|
|
63
|
+
"sfo1",
|
|
64
|
+
"nyc2",
|
|
65
|
+
"lon1",
|
|
66
|
+
"nyc3",
|
|
67
|
+
"ams3",
|
|
68
|
+
"ams2",
|
|
69
|
+
"fra1"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"size_slug": "512mb",
|
|
73
|
+
"networks": {
|
|
74
|
+
"v4": [
|
|
75
|
+
{
|
|
76
|
+
"ip_address": "104.131.186.241",
|
|
77
|
+
"netmask": "255.255.240.0",
|
|
78
|
+
"gateway": "104.131.176.1",
|
|
79
|
+
"type": "public"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"v6": []
|
|
83
|
+
},
|
|
84
|
+
"region": {
|
|
85
|
+
"name": "Amsterdam 1",
|
|
86
|
+
"slug": "ams1",
|
|
87
|
+
"sizes": [
|
|
88
|
+
"16gb",
|
|
89
|
+
"2gb",
|
|
90
|
+
"1gb",
|
|
91
|
+
"4gb",
|
|
92
|
+
"8gb",
|
|
93
|
+
"512mb"
|
|
94
|
+
],
|
|
95
|
+
"features": [
|
|
96
|
+
"virtio",
|
|
97
|
+
"backups"
|
|
98
|
+
],
|
|
99
|
+
"available": true
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
{
|
|
2
|
+
"droplets": [
|
|
3
|
+
{
|
|
4
|
+
"id": 100823,
|
|
5
|
+
"name": "example1.com",
|
|
6
|
+
"memory": 512,
|
|
7
|
+
"vcpus": 1,
|
|
8
|
+
"disk": 20,
|
|
9
|
+
"locked": false,
|
|
10
|
+
"status": "active",
|
|
11
|
+
"kernel": {
|
|
12
|
+
"id": 139,
|
|
13
|
+
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64",
|
|
14
|
+
"version": "2.6.32-358.6.2.el6.x86_64"
|
|
15
|
+
},
|
|
16
|
+
"created_at": "2013-05-28T22:36:38Z",
|
|
17
|
+
"features": [],
|
|
18
|
+
"backup_ids": [],
|
|
19
|
+
"next_backup_window": null,
|
|
20
|
+
"snapshot_ids": [],
|
|
21
|
+
"image": {
|
|
22
|
+
"id": 562354,
|
|
23
|
+
"name": "CentOS 6.4 x64",
|
|
24
|
+
"distribution": "CentOS",
|
|
25
|
+
"slug": "centos-6-4-x64",
|
|
26
|
+
"public": false,
|
|
27
|
+
"regions": [
|
|
28
|
+
"nyc1",
|
|
29
|
+
"ams1",
|
|
30
|
+
"sfo1",
|
|
31
|
+
"nyc2",
|
|
32
|
+
"ams2",
|
|
33
|
+
"sgp1",
|
|
34
|
+
"lon1",
|
|
35
|
+
"nyc3",
|
|
36
|
+
"ams3",
|
|
37
|
+
"fra1"
|
|
38
|
+
],
|
|
39
|
+
"created_at": "2013-07-24T20:45:07Z",
|
|
40
|
+
"min_disk_size": 20,
|
|
41
|
+
"type": "snapshot"
|
|
42
|
+
},
|
|
43
|
+
"size": {
|
|
44
|
+
"slug": "512mb",
|
|
45
|
+
"memory": 512,
|
|
46
|
+
"vcpus": 1,
|
|
47
|
+
"disk": 20,
|
|
48
|
+
"transfer": 1.0,
|
|
49
|
+
"price_monthly": 5.0,
|
|
50
|
+
"price_hourly": 0.00744,
|
|
51
|
+
"regions": [
|
|
52
|
+
"nyc1",
|
|
53
|
+
"sgp1",
|
|
54
|
+
"ams1",
|
|
55
|
+
"sfo1",
|
|
56
|
+
"nyc2",
|
|
57
|
+
"lon1",
|
|
58
|
+
"nyc3",
|
|
59
|
+
"ams3",
|
|
60
|
+
"ams2",
|
|
61
|
+
"fra1"
|
|
62
|
+
],
|
|
63
|
+
"available": true
|
|
64
|
+
},
|
|
65
|
+
"size_slug": "512mb",
|
|
66
|
+
"networks": {
|
|
67
|
+
"v4": [
|
|
68
|
+
{
|
|
69
|
+
"ip_address": "104.236.32.182",
|
|
70
|
+
"netmask": "255.255.192.0",
|
|
71
|
+
"gateway": "104.236.0.1",
|
|
72
|
+
"type": "public"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"v6": []
|
|
76
|
+
},
|
|
77
|
+
"region": {
|
|
78
|
+
"name": "Amsterdam 1",
|
|
79
|
+
"slug": "ams1",
|
|
80
|
+
"sizes": [
|
|
81
|
+
"16gb",
|
|
82
|
+
"2gb",
|
|
83
|
+
"1gb",
|
|
84
|
+
"4gb",
|
|
85
|
+
"8gb",
|
|
86
|
+
"512mb"
|
|
87
|
+
],
|
|
88
|
+
"features": [
|
|
89
|
+
"virtio",
|
|
90
|
+
"backups"
|
|
91
|
+
],
|
|
92
|
+
"available": true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": 100824,
|
|
97
|
+
"name": "example2.com",
|
|
98
|
+
"memory": 512,
|
|
99
|
+
"vcpus": 1,
|
|
100
|
+
"disk": 20,
|
|
101
|
+
"locked": false,
|
|
102
|
+
"status": "active",
|
|
103
|
+
"kernel": {
|
|
104
|
+
"id": 139,
|
|
105
|
+
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64",
|
|
106
|
+
"version": "2.6.32-358.6.2.el6.x86_64"
|
|
107
|
+
},
|
|
108
|
+
"created_at": "2013-11-29T08:15:38Z",
|
|
109
|
+
"features": ["virtio"],
|
|
110
|
+
"backup_ids": [],
|
|
111
|
+
"next_backup_window": null,
|
|
112
|
+
"snapshot_ids": [
|
|
113
|
+
],
|
|
114
|
+
"image": {
|
|
115
|
+
"id": 562354,
|
|
116
|
+
"name": "CentOS 6.4 x64",
|
|
117
|
+
"distribution": "CentOS",
|
|
118
|
+
"slug": "centos-6-4-x64",
|
|
119
|
+
"public": false,
|
|
120
|
+
"regions": [
|
|
121
|
+
"nyc1",
|
|
122
|
+
"ams1",
|
|
123
|
+
"sfo1",
|
|
124
|
+
"nyc2",
|
|
125
|
+
"ams2",
|
|
126
|
+
"sgp1",
|
|
127
|
+
"lon1",
|
|
128
|
+
"nyc3",
|
|
129
|
+
"ams3",
|
|
130
|
+
"fra1"
|
|
131
|
+
],
|
|
132
|
+
"created_at": "2014-07-11T22:00:45Z",
|
|
133
|
+
"min_disk_size": 20,
|
|
134
|
+
"type": "snapshot"
|
|
135
|
+
},
|
|
136
|
+
"size": {
|
|
137
|
+
"slug": "512mb",
|
|
138
|
+
"memory": 512,
|
|
139
|
+
"vcpus": 1,
|
|
140
|
+
"disk": 20,
|
|
141
|
+
"transfer": 1.0,
|
|
142
|
+
"price_monthly": 5.0,
|
|
143
|
+
"price_hourly": 0.00744,
|
|
144
|
+
"regions": [
|
|
145
|
+
"nyc1",
|
|
146
|
+
"sgp1",
|
|
147
|
+
"ams1",
|
|
148
|
+
"sfo1",
|
|
149
|
+
"nyc2",
|
|
150
|
+
"lon1",
|
|
151
|
+
"nyc3",
|
|
152
|
+
"ams3",
|
|
153
|
+
"ams2",
|
|
154
|
+
"fra1"
|
|
155
|
+
],
|
|
156
|
+
"available": true
|
|
157
|
+
},
|
|
158
|
+
"size_slug": "512mb",
|
|
159
|
+
"networks": {
|
|
160
|
+
"v4": [
|
|
161
|
+
{
|
|
162
|
+
"ip_address": "104.236.32.183",
|
|
163
|
+
"netmask": "255.255.192.0",
|
|
164
|
+
"gateway": "104.236.0.1",
|
|
165
|
+
"type": "public"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"v6": []
|
|
169
|
+
},
|
|
170
|
+
"region": {
|
|
171
|
+
"name": "Amsterdam 1",
|
|
172
|
+
"slug": "ams1",
|
|
173
|
+
"sizes": [
|
|
174
|
+
"16gb",
|
|
175
|
+
"2gb",
|
|
176
|
+
"1gb",
|
|
177
|
+
"4gb",
|
|
178
|
+
"8gb",
|
|
179
|
+
"512mb"
|
|
180
|
+
],
|
|
181
|
+
"features": [
|
|
182
|
+
"virtio",
|
|
183
|
+
"backups"
|
|
184
|
+
],
|
|
185
|
+
"available": true
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": 100825,
|
|
190
|
+
"name": "example3.com",
|
|
191
|
+
"memory": 512,
|
|
192
|
+
"vcpus": 1,
|
|
193
|
+
"disk": 20,
|
|
194
|
+
"locked": false,
|
|
195
|
+
"status": "active",
|
|
196
|
+
"kernel": {
|
|
197
|
+
"id": 139,
|
|
198
|
+
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64",
|
|
199
|
+
"version": "2.6.32-358.6.2.el6.x86_64"
|
|
200
|
+
},
|
|
201
|
+
"created_at": "2013-11-29T08:15:38Z",
|
|
202
|
+
"features": ["virtio"],
|
|
203
|
+
"backup_ids": [],
|
|
204
|
+
"next_backup_window": null,
|
|
205
|
+
"snapshot_ids": [
|
|
206
|
+
],
|
|
207
|
+
"image": {
|
|
208
|
+
"id": 562354,
|
|
209
|
+
"name": "CentOS 6.4 x64",
|
|
210
|
+
"distribution": "CentOS",
|
|
211
|
+
"slug": "centos-6-4-x64",
|
|
212
|
+
"public": false,
|
|
213
|
+
"regions": [
|
|
214
|
+
"nyc1",
|
|
215
|
+
"ams1",
|
|
216
|
+
"sfo1",
|
|
217
|
+
"nyc2",
|
|
218
|
+
"ams2",
|
|
219
|
+
"sgp1",
|
|
220
|
+
"lon1",
|
|
221
|
+
"nyc3",
|
|
222
|
+
"ams3",
|
|
223
|
+
"fra1"
|
|
224
|
+
],
|
|
225
|
+
"created_at": "2014-07-11T22:00:45Z",
|
|
226
|
+
"min_disk_size": 20,
|
|
227
|
+
"type": "snapshot"
|
|
228
|
+
},
|
|
229
|
+
"size": {
|
|
230
|
+
"slug": "512mb",
|
|
231
|
+
"memory": 512,
|
|
232
|
+
"vcpus": 1,
|
|
233
|
+
"disk": 20,
|
|
234
|
+
"transfer": 1.0,
|
|
235
|
+
"price_monthly": 5.0,
|
|
236
|
+
"price_hourly": 0.00744,
|
|
237
|
+
"regions": [
|
|
238
|
+
"nyc1",
|
|
239
|
+
"sgp1",
|
|
240
|
+
"ams1",
|
|
241
|
+
"sfo1",
|
|
242
|
+
"nyc2",
|
|
243
|
+
"lon1",
|
|
244
|
+
"nyc3",
|
|
245
|
+
"ams3",
|
|
246
|
+
"ams2",
|
|
247
|
+
"fra1"
|
|
248
|
+
],
|
|
249
|
+
"available": true
|
|
250
|
+
},
|
|
251
|
+
"size_slug": "512mb",
|
|
252
|
+
"networks": {
|
|
253
|
+
"v4": [
|
|
254
|
+
{
|
|
255
|
+
"ip_address": "104.236.32.184",
|
|
256
|
+
"netmask": "255.255.192.0",
|
|
257
|
+
"gateway": "104.236.0.1",
|
|
258
|
+
"type": "public"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"v6": []
|
|
262
|
+
},
|
|
263
|
+
"region": {
|
|
264
|
+
"name": "Amsterdam 1",
|
|
265
|
+
"slug": "ams1",
|
|
266
|
+
"sizes": [
|
|
267
|
+
"16gb",
|
|
268
|
+
"2gb",
|
|
269
|
+
"1gb",
|
|
270
|
+
"4gb",
|
|
271
|
+
"8gb",
|
|
272
|
+
"512mb"
|
|
273
|
+
],
|
|
274
|
+
"features": [
|
|
275
|
+
"virtio",
|
|
276
|
+
"backups"
|
|
277
|
+
],
|
|
278
|
+
"available": true
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"links": {},
|
|
283
|
+
"meta": {"total": 3}
|
|
284
|
+
}
|