tugboat 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -3
- data/features/{vagrant-adam → tugboat}/config_current_directory.feature +0 -0
- data/lib/tugboat/cli.rb +6 -1
- data/lib/tugboat/middleware/base.rb +59 -0
- data/lib/tugboat/middleware/check_credentials.rb +1 -10
- data/lib/tugboat/middleware/find_droplet.rb +23 -18
- data/lib/tugboat/middleware/list_droplets.rb +23 -19
- data/lib/tugboat/middleware/rebuild_droplet.rb +1 -1
- data/lib/tugboat/middleware/snapshot_droplet.rb +1 -1
- data/lib/tugboat/middleware/ssh_droplet.rb +15 -2
- data/lib/tugboat/middleware/wait_for_state.rb +1 -20
- data/lib/tugboat/version.rb +1 -1
- data/spec/cli/authorize_cli_spec.rb +2 -2
- data/spec/cli/create_cli_spec.rb +10 -10
- data/spec/cli/debug_cli_spec.rb +2 -2
- data/spec/cli/destroy_cli_spec.rb +22 -6
- data/spec/cli/droplets_cli_spec.rb +72 -8
- data/spec/cli/env_variable_spec.rb +4 -4
- data/spec/cli/halt_cli_spec.rb +24 -4
- data/spec/cli/info_cli_spec.rb +55 -10
- data/spec/cli/password_reset_cli_spec.rb +20 -4
- data/spec/cli/rebuild_cli_spec.rb +59 -19
- data/spec/cli/resize_cli_spec.rb +19 -3
- data/spec/cli/restart_cli_spec.rb +19 -3
- data/spec/cli/snapshot_cli_spec.rb +19 -3
- data/spec/cli/ssh_cli_spec.rb +37 -2
- data/spec/cli/start_cli_spec.rb +19 -3
- data/spec/cli/verify_cli_spec.rb +9 -9
- data/spec/cli/wait_cli_spec.rb +19 -3
- data/spec/fixtures/401.json +4 -0
- data/spec/fixtures/show_droplets.json +0 -4
- data/spec/fixtures/show_droplets_paginated_first.json +256 -0
- data/spec/fixtures/show_droplets_paginated_last.json +253 -0
- data/spec/fixtures/show_droplets_private_ip.json +258 -0
- data/spec/middleware/check_credentials_spec.rb +3 -3
- data/spec/middleware/ssh_droplet_spec.rb +21 -3
- data/tugboat.gemspec +1 -0
- metadata +26 -4
data/spec/cli/verify_cli_spec.rb
CHANGED
@@ -5,35 +5,35 @@ describe Tugboat::CLI do
|
|
5
5
|
|
6
6
|
describe "verify" do
|
7
7
|
it "returns confirmation text when verify passes" do
|
8
|
-
stub_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
8
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
9
9
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
10
10
|
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
11
11
|
|
12
12
|
@cli.verify
|
13
13
|
expect($stdout.string).to eq "Authentication with DigitalOcean was successful.\n"
|
14
|
-
expect(a_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
14
|
+
expect(a_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1")).to have_been_made
|
15
15
|
end
|
16
16
|
|
17
17
|
it "returns error when verify fails" do
|
18
|
-
stub_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
18
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
19
19
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
20
|
-
to_return(:headers => {'Content-Type' => 'text/html'}, :status =>
|
20
|
+
to_return(:headers => {'Content-Type' => 'text/html'}, :status => 401, :body => fixture('401'))
|
21
21
|
|
22
22
|
expect { @cli.verify }.to raise_error(SystemExit)
|
23
|
-
expect($stdout.string).to include "
|
24
|
-
expect(a_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
23
|
+
expect($stdout.string).to include "Failed to connect to DigitalOcean. Reason given from API: unauthorized - Unable to authenticate you."
|
24
|
+
expect(a_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1")).to have_been_made
|
25
25
|
end
|
26
26
|
|
27
27
|
it "returns error string when verify fails and a non-json reponse is given" do
|
28
|
-
stub_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
28
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
29
29
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
30
30
|
to_return(:headers => {'Content-Type' => 'text/html'}, :status => 500, :body => fixture('500','html'))
|
31
31
|
|
32
32
|
expect { @cli.verify }.to raise_error(SystemExit)
|
33
|
-
expect($stdout.string).to include "Authentication with DigitalOcean failed
|
33
|
+
expect($stdout.string).to include "Authentication with DigitalOcean failed at an early stage"
|
34
34
|
expect($stdout.string).to include "<title>DigitalOcean - Seems we've encountered a problem!</title>"
|
35
35
|
# TODO: Make it so this doesnt barf up a huge HTML file...
|
36
|
-
expect(a_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
36
|
+
expect(a_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1")).to have_been_made
|
37
37
|
end
|
38
38
|
|
39
39
|
end
|
data/spec/cli/wait_cli_spec.rb
CHANGED
@@ -5,7 +5,11 @@ describe Tugboat::CLI do
|
|
5
5
|
|
6
6
|
describe "wait" do
|
7
7
|
it "waits for a droplet with a fuzzy name" do
|
8
|
-
stub_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
8
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
9
|
+
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
10
|
+
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
11
|
+
|
12
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=200").
|
9
13
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
10
14
|
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
11
15
|
|
@@ -23,7 +27,11 @@ eos
|
|
23
27
|
end
|
24
28
|
|
25
29
|
it "loops whilst it waits for state" do
|
26
|
-
stub_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
30
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
31
|
+
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
32
|
+
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
33
|
+
|
34
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=200").
|
27
35
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
28
36
|
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
29
37
|
|
@@ -46,6 +54,10 @@ eos
|
|
46
54
|
end
|
47
55
|
|
48
56
|
it "waits for a droplet with an id" do
|
57
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
58
|
+
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
59
|
+
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
60
|
+
|
49
61
|
stub_request(:get, "https://api.digitalocean.com/v2/droplets/6918990?per_page=200").
|
50
62
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
51
63
|
to_return(:status => 200, :body => fixture('show_droplet'), :headers => {})
|
@@ -60,7 +72,11 @@ Waiting for droplet to become active..done\e[0m (0s)
|
|
60
72
|
end
|
61
73
|
|
62
74
|
it "waits for a droplet with a name" do
|
63
|
-
stub_request(:get, "https://api.digitalocean.com/v2/droplets?per_page=
|
75
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=1").
|
76
|
+
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
77
|
+
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
78
|
+
|
79
|
+
stub_request(:get, "https://api.digitalocean.com/v2/droplets?page=1&per_page=200").
|
64
80
|
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer foo', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.2'}).
|
65
81
|
to_return(:status => 200, :body => fixture('show_droplets'), :headers => {})
|
66
82
|
|
@@ -0,0 +1,256 @@
|
|
1
|
+
{
|
2
|
+
"droplets": [
|
3
|
+
{
|
4
|
+
"id": 6918990,
|
5
|
+
"name": "page1example.com",
|
6
|
+
"memory": 512,
|
7
|
+
"vcpus": 1,
|
8
|
+
"disk": 20,
|
9
|
+
"locked": false,
|
10
|
+
"status": "active",
|
11
|
+
"kernel": {
|
12
|
+
"id": 2233,
|
13
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
|
14
|
+
"version": "3.13.0-37-generic"
|
15
|
+
},
|
16
|
+
"created_at": "2014-11-14T16:29:21Z",
|
17
|
+
"features": [
|
18
|
+
"backups",
|
19
|
+
"ipv6",
|
20
|
+
"virtio"
|
21
|
+
],
|
22
|
+
"backup_ids": [
|
23
|
+
7938002
|
24
|
+
],
|
25
|
+
"snapshot_ids": [
|
26
|
+
|
27
|
+
],
|
28
|
+
"image": {
|
29
|
+
"id": 6918990,
|
30
|
+
"name": "14.04 x64",
|
31
|
+
"distribution": "Ubuntu",
|
32
|
+
"slug": "ubuntu-14-04-x64",
|
33
|
+
"public": true,
|
34
|
+
"regions": [
|
35
|
+
"nyc1",
|
36
|
+
"ams1",
|
37
|
+
"sfo1",
|
38
|
+
"nyc2",
|
39
|
+
"ams2",
|
40
|
+
"sgp1",
|
41
|
+
"lon1",
|
42
|
+
"nyc3",
|
43
|
+
"ams3",
|
44
|
+
"nyc3"
|
45
|
+
],
|
46
|
+
"created_at": "2014-10-17T20:24:33Z",
|
47
|
+
"min_disk_size": 20
|
48
|
+
},
|
49
|
+
"size_slug": "512mb",
|
50
|
+
"networks": {
|
51
|
+
"v4": [
|
52
|
+
{
|
53
|
+
"ip_address": "104.236.32.182",
|
54
|
+
"netmask": "255.255.192.0",
|
55
|
+
"gateway": "104.236.0.1",
|
56
|
+
"type": "public"
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"v6": [
|
60
|
+
{
|
61
|
+
"ip_address": "2604:A880:0800:0010:0000:0000:02DD:4001",
|
62
|
+
"netmask": 64,
|
63
|
+
"gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
|
64
|
+
"type": "public"
|
65
|
+
}
|
66
|
+
]
|
67
|
+
},
|
68
|
+
"region": {
|
69
|
+
"name": "New York 3",
|
70
|
+
"slug": "nyc3",
|
71
|
+
"sizes": [
|
72
|
+
|
73
|
+
],
|
74
|
+
"features": [
|
75
|
+
"virtio",
|
76
|
+
"private_networking",
|
77
|
+
"backups",
|
78
|
+
"ipv6",
|
79
|
+
"metadata"
|
80
|
+
],
|
81
|
+
"available": null
|
82
|
+
}
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"id": 3164956,
|
86
|
+
"name": "page1example2.com",
|
87
|
+
"memory": 512,
|
88
|
+
"vcpus": 1,
|
89
|
+
"disk": 20,
|
90
|
+
"locked": false,
|
91
|
+
"status": "active",
|
92
|
+
"kernel": {
|
93
|
+
"id": 2233,
|
94
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
|
95
|
+
"version": "3.13.0-37-generic"
|
96
|
+
},
|
97
|
+
"created_at": "2014-08-14T16:29:21Z",
|
98
|
+
"features": [
|
99
|
+
"backups",
|
100
|
+
"ipv6",
|
101
|
+
"virtio"
|
102
|
+
],
|
103
|
+
"backup_ids": [
|
104
|
+
7938002
|
105
|
+
],
|
106
|
+
"snapshot_ids": [
|
107
|
+
|
108
|
+
],
|
109
|
+
"image": {
|
110
|
+
"id": 6918990,
|
111
|
+
"name": "14.04 x64",
|
112
|
+
"distribution": "Ubuntu",
|
113
|
+
"slug": "ubuntu-14-04-x64",
|
114
|
+
"public": true,
|
115
|
+
"regions": [
|
116
|
+
"nyc1",
|
117
|
+
"ams1",
|
118
|
+
"sfo1",
|
119
|
+
"nyc2",
|
120
|
+
"ams2",
|
121
|
+
"sgp1",
|
122
|
+
"lon1",
|
123
|
+
"nyc3",
|
124
|
+
"ams3",
|
125
|
+
"nyc3"
|
126
|
+
],
|
127
|
+
"created_at": "2014-10-17T20:24:33Z",
|
128
|
+
"min_disk_size": 20
|
129
|
+
},
|
130
|
+
"size_slug": "512mb",
|
131
|
+
"networks": {
|
132
|
+
"v4": [
|
133
|
+
{
|
134
|
+
"ip_address": "104.236.32.172",
|
135
|
+
"netmask": "255.255.192.0",
|
136
|
+
"gateway": "104.236.0.1",
|
137
|
+
"type": "public"
|
138
|
+
}
|
139
|
+
],
|
140
|
+
"v6": [
|
141
|
+
{
|
142
|
+
"ip_address": "2604:A880:0800:0010:0000:0000:02DD:4001",
|
143
|
+
"netmask": 64,
|
144
|
+
"gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
|
145
|
+
"type": "public"
|
146
|
+
}
|
147
|
+
]
|
148
|
+
},
|
149
|
+
"region": {
|
150
|
+
"name": "New York 3",
|
151
|
+
"slug": "nyc3",
|
152
|
+
"sizes": [
|
153
|
+
|
154
|
+
],
|
155
|
+
"features": [
|
156
|
+
"virtio",
|
157
|
+
"private_networking",
|
158
|
+
"backups",
|
159
|
+
"ipv6",
|
160
|
+
"metadata"
|
161
|
+
],
|
162
|
+
"available": null
|
163
|
+
}
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"id": 3164444,
|
167
|
+
"name": "page1example3.com",
|
168
|
+
"memory": 512,
|
169
|
+
"vcpus": 1,
|
170
|
+
"disk": 20,
|
171
|
+
"locked": false,
|
172
|
+
"status": "off",
|
173
|
+
"kernel": {
|
174
|
+
"id": 2233,
|
175
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
|
176
|
+
"version": "3.13.0-37-generic"
|
177
|
+
},
|
178
|
+
"created_at": "2014-08-14T16:29:21Z",
|
179
|
+
"features": [
|
180
|
+
"backups",
|
181
|
+
"ipv6",
|
182
|
+
"virtio"
|
183
|
+
],
|
184
|
+
"backup_ids": [
|
185
|
+
7938002
|
186
|
+
],
|
187
|
+
"snapshot_ids": [
|
188
|
+
|
189
|
+
],
|
190
|
+
"image": {
|
191
|
+
"id": 6918990,
|
192
|
+
"name": "14.04 x64",
|
193
|
+
"distribution": "Ubuntu",
|
194
|
+
"slug": "ubuntu-14-04-x64",
|
195
|
+
"public": true,
|
196
|
+
"regions": [
|
197
|
+
"nyc1",
|
198
|
+
"ams1",
|
199
|
+
"sfo1",
|
200
|
+
"nyc2",
|
201
|
+
"ams2",
|
202
|
+
"sgp1",
|
203
|
+
"lon1",
|
204
|
+
"nyc3",
|
205
|
+
"ams3",
|
206
|
+
"nyc3"
|
207
|
+
],
|
208
|
+
"created_at": "2014-10-17T20:24:33Z",
|
209
|
+
"min_disk_size": 20
|
210
|
+
},
|
211
|
+
"size_slug": "512mb",
|
212
|
+
"networks": {
|
213
|
+
"v4": [
|
214
|
+
{
|
215
|
+
"ip_address": "104.236.32.173",
|
216
|
+
"netmask": "255.255.192.0",
|
217
|
+
"gateway": "104.236.0.1",
|
218
|
+
"type": "public"
|
219
|
+
}
|
220
|
+
],
|
221
|
+
"v6": [
|
222
|
+
{
|
223
|
+
"ip_address": "2604:A880:0800:0010:0000:0000:02DD:4001",
|
224
|
+
"netmask": 64,
|
225
|
+
"gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
|
226
|
+
"type": "public"
|
227
|
+
}
|
228
|
+
]
|
229
|
+
},
|
230
|
+
"region": {
|
231
|
+
"name": "New York 3",
|
232
|
+
"slug": "nyc3",
|
233
|
+
"sizes": [
|
234
|
+
|
235
|
+
],
|
236
|
+
"features": [
|
237
|
+
"virtio",
|
238
|
+
"private_networking",
|
239
|
+
"backups",
|
240
|
+
"ipv6",
|
241
|
+
"metadata"
|
242
|
+
],
|
243
|
+
"available": null
|
244
|
+
}
|
245
|
+
}
|
246
|
+
],
|
247
|
+
"links": {
|
248
|
+
"pages": {
|
249
|
+
"last": "https://api.digitalocean.com/v2/droplets?page=2&per_page=1",
|
250
|
+
"next": "https://api.digitalocean.com/v2/droplets?page=2&per_page=1"
|
251
|
+
}
|
252
|
+
},
|
253
|
+
"meta": {
|
254
|
+
"total": 4
|
255
|
+
}
|
256
|
+
}
|
@@ -0,0 +1,253 @@
|
|
1
|
+
{
|
2
|
+
"droplets": [
|
3
|
+
{
|
4
|
+
"id": 6918990,
|
5
|
+
"name": "page2example.com",
|
6
|
+
"memory": 512,
|
7
|
+
"vcpus": 1,
|
8
|
+
"disk": 20,
|
9
|
+
"locked": false,
|
10
|
+
"status": "active",
|
11
|
+
"kernel": {
|
12
|
+
"id": 2233,
|
13
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
|
14
|
+
"version": "3.13.0-37-generic"
|
15
|
+
},
|
16
|
+
"created_at": "2014-11-14T16:29:21Z",
|
17
|
+
"features": [
|
18
|
+
"backups",
|
19
|
+
"ipv6",
|
20
|
+
"virtio"
|
21
|
+
],
|
22
|
+
"backup_ids": [
|
23
|
+
7938002
|
24
|
+
],
|
25
|
+
"snapshot_ids": [
|
26
|
+
|
27
|
+
],
|
28
|
+
"image": {
|
29
|
+
"id": 6918990,
|
30
|
+
"name": "14.04 x64",
|
31
|
+
"distribution": "Ubuntu",
|
32
|
+
"slug": "ubuntu-14-04-x64",
|
33
|
+
"public": true,
|
34
|
+
"regions": [
|
35
|
+
"nyc1",
|
36
|
+
"ams1",
|
37
|
+
"sfo1",
|
38
|
+
"nyc2",
|
39
|
+
"ams2",
|
40
|
+
"sgp1",
|
41
|
+
"lon1",
|
42
|
+
"nyc3",
|
43
|
+
"ams3",
|
44
|
+
"nyc3"
|
45
|
+
],
|
46
|
+
"created_at": "2014-10-17T20:24:33Z",
|
47
|
+
"min_disk_size": 20
|
48
|
+
},
|
49
|
+
"size_slug": "512mb",
|
50
|
+
"networks": {
|
51
|
+
"v4": [
|
52
|
+
{
|
53
|
+
"ip_address": "104.236.32.182",
|
54
|
+
"netmask": "255.255.192.0",
|
55
|
+
"gateway": "104.236.0.1",
|
56
|
+
"type": "public"
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"v6": [
|
60
|
+
{
|
61
|
+
"ip_address": "2604:A880:0800:0010:0000:0000:02DD:4001",
|
62
|
+
"netmask": 64,
|
63
|
+
"gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
|
64
|
+
"type": "public"
|
65
|
+
}
|
66
|
+
]
|
67
|
+
},
|
68
|
+
"region": {
|
69
|
+
"name": "New York 3",
|
70
|
+
"slug": "nyc3",
|
71
|
+
"sizes": [
|
72
|
+
|
73
|
+
],
|
74
|
+
"features": [
|
75
|
+
"virtio",
|
76
|
+
"private_networking",
|
77
|
+
"backups",
|
78
|
+
"ipv6",
|
79
|
+
"metadata"
|
80
|
+
],
|
81
|
+
"available": null
|
82
|
+
}
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"id": 3164956,
|
86
|
+
"name": "page2example2.com",
|
87
|
+
"memory": 512,
|
88
|
+
"vcpus": 1,
|
89
|
+
"disk": 20,
|
90
|
+
"locked": false,
|
91
|
+
"status": "active",
|
92
|
+
"kernel": {
|
93
|
+
"id": 2233,
|
94
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
|
95
|
+
"version": "3.13.0-37-generic"
|
96
|
+
},
|
97
|
+
"created_at": "2014-08-14T16:29:21Z",
|
98
|
+
"features": [
|
99
|
+
"backups",
|
100
|
+
"ipv6",
|
101
|
+
"virtio"
|
102
|
+
],
|
103
|
+
"backup_ids": [
|
104
|
+
7938002
|
105
|
+
],
|
106
|
+
"snapshot_ids": [
|
107
|
+
|
108
|
+
],
|
109
|
+
"image": {
|
110
|
+
"id": 6918990,
|
111
|
+
"name": "14.04 x64",
|
112
|
+
"distribution": "Ubuntu",
|
113
|
+
"slug": "ubuntu-14-04-x64",
|
114
|
+
"public": true,
|
115
|
+
"regions": [
|
116
|
+
"nyc1",
|
117
|
+
"ams1",
|
118
|
+
"sfo1",
|
119
|
+
"nyc2",
|
120
|
+
"ams2",
|
121
|
+
"sgp1",
|
122
|
+
"lon1",
|
123
|
+
"nyc3",
|
124
|
+
"ams3",
|
125
|
+
"nyc3"
|
126
|
+
],
|
127
|
+
"created_at": "2014-10-17T20:24:33Z",
|
128
|
+
"min_disk_size": 20
|
129
|
+
},
|
130
|
+
"size_slug": "512mb",
|
131
|
+
"networks": {
|
132
|
+
"v4": [
|
133
|
+
{
|
134
|
+
"ip_address": "104.236.32.172",
|
135
|
+
"netmask": "255.255.192.0",
|
136
|
+
"gateway": "104.236.0.1",
|
137
|
+
"type": "public"
|
138
|
+
}
|
139
|
+
],
|
140
|
+
"v6": [
|
141
|
+
{
|
142
|
+
"ip_address": "2604:A880:0800:0010:0000:0000:02DD:4001",
|
143
|
+
"netmask": 64,
|
144
|
+
"gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
|
145
|
+
"type": "public"
|
146
|
+
}
|
147
|
+
]
|
148
|
+
},
|
149
|
+
"region": {
|
150
|
+
"name": "New York 3",
|
151
|
+
"slug": "nyc3",
|
152
|
+
"sizes": [
|
153
|
+
|
154
|
+
],
|
155
|
+
"features": [
|
156
|
+
"virtio",
|
157
|
+
"private_networking",
|
158
|
+
"backups",
|
159
|
+
"ipv6",
|
160
|
+
"metadata"
|
161
|
+
],
|
162
|
+
"available": null
|
163
|
+
}
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"id": 3164444,
|
167
|
+
"name": "page2example3.com",
|
168
|
+
"memory": 512,
|
169
|
+
"vcpus": 1,
|
170
|
+
"disk": 20,
|
171
|
+
"locked": false,
|
172
|
+
"status": "off",
|
173
|
+
"kernel": {
|
174
|
+
"id": 2233,
|
175
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
|
176
|
+
"version": "3.13.0-37-generic"
|
177
|
+
},
|
178
|
+
"created_at": "2014-08-14T16:29:21Z",
|
179
|
+
"features": [
|
180
|
+
"backups",
|
181
|
+
"ipv6",
|
182
|
+
"virtio"
|
183
|
+
],
|
184
|
+
"backup_ids": [
|
185
|
+
7938002
|
186
|
+
],
|
187
|
+
"snapshot_ids": [
|
188
|
+
|
189
|
+
],
|
190
|
+
"image": {
|
191
|
+
"id": 6918990,
|
192
|
+
"name": "14.04 x64",
|
193
|
+
"distribution": "Ubuntu",
|
194
|
+
"slug": "ubuntu-14-04-x64",
|
195
|
+
"public": true,
|
196
|
+
"regions": [
|
197
|
+
"nyc1",
|
198
|
+
"ams1",
|
199
|
+
"sfo1",
|
200
|
+
"nyc2",
|
201
|
+
"ams2",
|
202
|
+
"sgp1",
|
203
|
+
"lon1",
|
204
|
+
"nyc3",
|
205
|
+
"ams3",
|
206
|
+
"nyc3"
|
207
|
+
],
|
208
|
+
"created_at": "2014-10-17T20:24:33Z",
|
209
|
+
"min_disk_size": 20
|
210
|
+
},
|
211
|
+
"size_slug": "512mb",
|
212
|
+
"networks": {
|
213
|
+
"v4": [
|
214
|
+
{
|
215
|
+
"ip_address": "104.236.32.173",
|
216
|
+
"netmask": "255.255.192.0",
|
217
|
+
"gateway": "104.236.0.1",
|
218
|
+
"type": "public"
|
219
|
+
}
|
220
|
+
],
|
221
|
+
"v6": [
|
222
|
+
{
|
223
|
+
"ip_address": "2604:A880:0800:0010:0000:0000:02DD:4001",
|
224
|
+
"netmask": 64,
|
225
|
+
"gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
|
226
|
+
"type": "public"
|
227
|
+
}
|
228
|
+
]
|
229
|
+
},
|
230
|
+
"region": {
|
231
|
+
"name": "New York 3",
|
232
|
+
"slug": "nyc3",
|
233
|
+
"sizes": [
|
234
|
+
|
235
|
+
],
|
236
|
+
"features": [
|
237
|
+
"virtio",
|
238
|
+
"private_networking",
|
239
|
+
"backups",
|
240
|
+
"ipv6",
|
241
|
+
"metadata"
|
242
|
+
],
|
243
|
+
"available": null
|
244
|
+
}
|
245
|
+
}
|
246
|
+
],
|
247
|
+
"links": {
|
248
|
+
|
249
|
+
},
|
250
|
+
"meta": {
|
251
|
+
"total": 4
|
252
|
+
}
|
253
|
+
}
|