knife-digital_ocean 2.2.0 → 2.3.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 +16 -0
- data/README.md +112 -20
- data/Rakefile +6 -0
- data/knife-digital_ocean.gemspec +4 -0
- data/lib/chef/knife/digital_ocean_base.rb +15 -0
- data/lib/chef/knife/digital_ocean_domain_create.rb +9 -10
- data/lib/chef/knife/digital_ocean_domain_destroy.rb +5 -5
- data/lib/chef/knife/digital_ocean_domain_list.rb +1 -2
- data/lib/chef/knife/digital_ocean_domain_record_create.rb +18 -18
- data/lib/chef/knife/digital_ocean_domain_record_destroy.rb +9 -10
- data/lib/chef/knife/digital_ocean_domain_record_edit.rb +21 -21
- data/lib/chef/knife/digital_ocean_domain_record_list.rb +4 -5
- data/lib/chef/knife/digital_ocean_droplet_create.rb +4 -5
- data/lib/chef/knife/digital_ocean_droplet_destroy.rb +3 -6
- data/lib/chef/knife/digital_ocean_droplet_power.rb +66 -0
- data/lib/chef/knife/digital_ocean_droplet_powercycle.rb +48 -0
- data/lib/chef/knife/digital_ocean_droplet_reboot.rb +48 -0
- data/lib/chef/knife/digital_ocean_droplet_rebuild.rb +58 -0
- data/lib/chef/knife/digital_ocean_droplet_rename.rb +58 -0
- data/lib/chef/knife/digital_ocean_droplet_resize.rb +58 -0
- data/lib/chef/knife/digital_ocean_droplet_snapshot.rb +58 -0
- data/lib/chef/knife/digital_ocean_image_destroy.rb +42 -0
- data/lib/chef/knife/digital_ocean_image_list.rb +1 -1
- data/lib/chef/knife/digital_ocean_image_transfer.rb +66 -0
- data/lib/chef/knife/digital_ocean_region_list.rb +1 -1
- data/lib/chef/knife/digital_ocean_sshkey_create.rb +11 -11
- data/lib/chef/knife/digital_ocean_sshkey_destroy.rb +6 -6
- data/lib/chef/knife/digital_ocean_sshkey_list.rb +1 -1
- data/lib/knife-digital_ocean/version.rb +1 -1
- data/spec/fixtures/keys/id_rsa.pub +1 -0
- data/spec/fixtures/vcr_cassettes/accountinfo.yml +7 -9
- data/spec/fixtures/vcr_cassettes/domain_create.yml +65 -0
- data/spec/fixtures/vcr_cassettes/{domainlist.yml → domain_list.yml} +15 -12
- data/spec/fixtures/vcr_cassettes/domain_record_create.yml +65 -0
- data/spec/fixtures/vcr_cassettes/domain_record_list.yml +63 -0
- data/spec/fixtures/vcr_cassettes/droplet.yml +12 -17
- data/spec/fixtures/vcr_cassettes/droplet_power.yml +65 -0
- data/spec/fixtures/vcr_cassettes/droplet_powercycle.yml +127 -0
- data/spec/fixtures/vcr_cassettes/droplet_reboot.yml +127 -0
- data/spec/fixtures/vcr_cassettes/droplet_rebuild.yml +65 -0
- data/spec/fixtures/vcr_cassettes/droplet_rename.yml +127 -0
- data/spec/fixtures/vcr_cassettes/droplet_resize.yml +65 -0
- data/spec/fixtures/vcr_cassettes/droplet_snapshot.yml +1057 -0
- data/spec/fixtures/vcr_cassettes/image.yml +55 -59
- data/spec/fixtures/vcr_cassettes/public_images.yml +54 -59
- data/spec/fixtures/vcr_cassettes/region.yml +8 -10
- data/spec/fixtures/vcr_cassettes/sizes.yml +8 -10
- data/spec/fixtures/vcr_cassettes/sshkey.yml +8 -10
- data/spec/fixtures/vcr_cassettes/sshkey_create.yml +68 -0
- data/spec/lib/chef/knife/digital_ocean_account_info_spec.rb +4 -4
- data/spec/lib/chef/knife/digital_ocean_domain_create_spec.rb +35 -1
- data/spec/lib/chef/knife/digital_ocean_domain_list_spec.rb +8 -9
- data/spec/lib/chef/knife/digital_ocean_domain_record_create_spec.rb +37 -1
- data/spec/lib/chef/knife/digital_ocean_domain_record_list_spec.rb +34 -1
- data/spec/lib/chef/knife/digital_ocean_droplet_create_spec.rb +5 -1
- data/spec/lib/chef/knife/digital_ocean_droplet_list_spec.rb +4 -4
- data/spec/lib/chef/knife/digital_ocean_droplet_power_spec.rb +39 -0
- data/spec/lib/chef/knife/digital_ocean_droplet_powercycle_spec.rb +38 -0
- data/spec/lib/chef/knife/digital_ocean_droplet_reboot_spec.rb +38 -0
- data/spec/lib/chef/knife/digital_ocean_droplet_rebuild_spec.rb +39 -0
- data/spec/lib/chef/knife/digital_ocean_droplet_rename_spec.rb +39 -0
- data/spec/lib/chef/knife/digital_ocean_droplet_resize_spec.rb +39 -0
- data/spec/lib/chef/knife/digital_ocean_droplet_snapshot_spec.rb +39 -0
- data/spec/lib/chef/knife/digital_ocean_image_list_spec.rb +8 -10
- data/spec/lib/chef/knife/digital_ocean_region_list_spec.rb +4 -4
- data/spec/lib/chef/knife/digital_ocean_size_list_spec.rb +4 -4
- data/spec/lib/chef/knife/digital_ocean_sshkey_create_spec.rb +35 -1
- data/spec/lib/chef/knife/digital_ocean_sshkey_list_spec.rb +4 -4
- data/spec/spec_helper.rb +29 -2
- metadata +93 -6
- data/spec/lib/chef/knife/digital_ocean_domain_record_edit_spec.rb +0 -5
@@ -25,16 +25,14 @@ http_interactions:
|
|
25
25
|
Server:
|
26
26
|
- cloudflare-nginx
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Sun, 16 Nov 2014 01:20:39 GMT
|
29
29
|
Content-Type:
|
30
30
|
- application/json; charset=utf-8
|
31
31
|
Transfer-Encoding:
|
32
32
|
- chunked
|
33
33
|
Connection:
|
34
34
|
- keep-alive
|
35
|
-
Set-Cookie:
|
36
|
-
- __cfduid=da09923cc0418e749f91c7994a5bd60711415671404660; expires=Mon, 23-Dec-2019
|
37
|
-
23:50:00 GMT; path=/; domain=.digitalocean.com; HttpOnly
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
38
36
|
Status:
|
39
37
|
- 200 OK
|
40
38
|
X-Frame-Options:
|
@@ -46,24 +44,29 @@ http_interactions:
|
|
46
44
|
Ratelimit-Limit:
|
47
45
|
- '1200'
|
48
46
|
Ratelimit-Remaining:
|
49
|
-
- '
|
47
|
+
- '1167'
|
50
48
|
Ratelimit-Reset:
|
51
|
-
- '
|
49
|
+
- '1416100824'
|
52
50
|
Cache-Control:
|
53
51
|
- max-age=0, private, must-revalidate
|
54
52
|
X-Request-Id:
|
55
|
-
-
|
53
|
+
- 7855e169-0ce2-4ca2-82f3-ac5b7873b7c5
|
56
54
|
X-Runtime:
|
57
|
-
- '0.
|
55
|
+
- '0.092900'
|
58
56
|
Cf-Ray:
|
59
|
-
-
|
57
|
+
- 189fde06189f0ec7-EWR
|
60
58
|
body:
|
61
59
|
encoding: UTF-8
|
62
60
|
string: '{"domains":[{"name":"gregf.org","ttl":1800,"zone_file":"$ORIGIN gregf.org.\n$TTL
|
63
|
-
1800\ngregf.org. IN SOA ns1.digitalocean.com. hostmaster.gregf.org.
|
61
|
+
1800\ngregf.org. IN SOA ns1.digitalocean.com. hostmaster.gregf.org. 1416010116
|
64
62
|
10800 3600 604800 1800\ngregf.org. 1800 IN NS ns1.digitalocean.com.\ngregf.org.
|
65
63
|
1800 IN NS ns2.digitalocean.com.\ngregf.org. 1800 IN NS ns3.digitalocean.com.\ngregf.org.
|
66
|
-
1800 IN A 162.243.243.162\n"}
|
64
|
+
1800 IN A 162.243.243.162\n"},{"name":"kitchen-digital.org","ttl":1800,"zone_file":"$ORIGIN
|
65
|
+
kitchen-digital.org.\n$TTL 1800\nkitchen-digital.org. IN SOA ns1.digitalocean.com.
|
66
|
+
hostmaster.kitchen-digital.org. 1416100137 10800 3600 604800 1800\nkitchen-digital.org.
|
67
|
+
1800 IN NS ns1.digitalocean.com.\nkitchen-digital.org. 1800 IN NS ns2.digitalocean.com.\nkitchen-digital.org.
|
68
|
+
1800 IN NS ns3.digitalocean.com.\nkitchen-digital.org. 1800 IN A 192.168.1.1\nwww.kitchen-digital.org.
|
69
|
+
1800 IN A 192.168.1.1\n"}],"links":{},"meta":{"total":2}}'
|
67
70
|
http_version:
|
68
|
-
recorded_at:
|
71
|
+
recorded_at: Sun, 16 Nov 2014 01:20:39 GMT
|
69
72
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.digitalocean.com/v2/domains/kitchen-digital.org/records
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"A","name":"www","data":"192.168.1.1","priority":null,"port":null,"weight":null}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Bearer FAKE_ACCESS_TOKEN
|
14
|
+
User-Agent:
|
15
|
+
- Faraday v0.9.0
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- cloudflare-nginx
|
27
|
+
Date:
|
28
|
+
- Sun, 16 Nov 2014 03:56:18 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
36
|
+
Status:
|
37
|
+
- 201 Created
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
X-Xss-Protection:
|
41
|
+
- 1; mode=block
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
Ratelimit-Limit:
|
45
|
+
- '1200'
|
46
|
+
Ratelimit-Remaining:
|
47
|
+
- '1168'
|
48
|
+
Ratelimit-Reset:
|
49
|
+
- '1416110320'
|
50
|
+
Etag:
|
51
|
+
- '"4b1f4071506a80f05aefbc7bd95dcda1"'
|
52
|
+
Cache-Control:
|
53
|
+
- max-age=0, private, must-revalidate
|
54
|
+
X-Request-Id:
|
55
|
+
- 0cfc045c-ddea-4c9e-824b-11ef8666790b
|
56
|
+
X-Runtime:
|
57
|
+
- '0.139235'
|
58
|
+
Cf-Ray:
|
59
|
+
- 18a0c20905060ecd-EWR
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"domain_record":{"id":3365311,"type":"A","name":"www","data":"192.168.1.1","priority":null,"port":null,"weight":null}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Sun, 16 Nov 2014 03:56:18 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/v2/domains/kitchen-digital.org/records
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Bearer FAKE_ACCESS_TOKEN
|
14
|
+
User-Agent:
|
15
|
+
- Faraday v0.9.0
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- cloudflare-nginx
|
27
|
+
Date:
|
28
|
+
- Sun, 16 Nov 2014 01:22:40 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
36
|
+
Status:
|
37
|
+
- 200 OK
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
X-Xss-Protection:
|
41
|
+
- 1; mode=block
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
Ratelimit-Limit:
|
45
|
+
- '1200'
|
46
|
+
Ratelimit-Remaining:
|
47
|
+
- '1168'
|
48
|
+
Ratelimit-Reset:
|
49
|
+
- '1416100895'
|
50
|
+
Cache-Control:
|
51
|
+
- max-age=0, private, must-revalidate
|
52
|
+
X-Request-Id:
|
53
|
+
- 0b474c88-a6e4-4e5a-a122-2aebcdfa0444
|
54
|
+
X-Runtime:
|
55
|
+
- '0.112263'
|
56
|
+
Cf-Ray:
|
57
|
+
- 189fe0f81f070ecd-EWR
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '{"domain_records":[{"id":3364432,"type":"NS","name":"@","data":"ns1.digitalocean.com","priority":null,"port":null,"weight":null},{"id":3364433,"type":"NS","name":"@","data":"ns2.digitalocean.com","priority":null,"port":null,"weight":null},{"id":3364434,"type":"NS","name":"@","data":"ns3.digitalocean.com","priority":null,"port":null,"weight":null},{"id":3364435,"type":"A","name":"@","data":"192.168.1.1","priority":null,"port":null,"weight":null},{"id":3364507,"type":"A","name":"www","data":"192.168.1.1","priority":null,"port":null,"weight":null}],"links":{},"meta":{"total":5}}'
|
61
|
+
http_version:
|
62
|
+
recorded_at: Sun, 16 Nov 2014 01:22:40 GMT
|
63
|
+
recorded_with: VCR 2.9.3
|
@@ -25,16 +25,14 @@ http_interactions:
|
|
25
25
|
Server:
|
26
26
|
- cloudflare-nginx
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Sun, 16 Nov 2014 00:35:59 GMT
|
29
29
|
Content-Type:
|
30
30
|
- application/json; charset=utf-8
|
31
31
|
Transfer-Encoding:
|
32
32
|
- chunked
|
33
33
|
Connection:
|
34
34
|
- keep-alive
|
35
|
-
Set-Cookie:
|
36
|
-
- __cfduid=d333cb27b09f6cb1055ec559839ab87f71415587026763; expires=Mon, 23-Dec-2019
|
37
|
-
23:50:00 GMT; path=/; domain=.digitalocean.com; HttpOnly
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
38
36
|
Status:
|
39
37
|
- 200 OK
|
40
38
|
X-Frame-Options:
|
@@ -46,31 +44,28 @@ http_interactions:
|
|
46
44
|
Ratelimit-Limit:
|
47
45
|
- '1200'
|
48
46
|
Ratelimit-Remaining:
|
49
|
-
- '
|
47
|
+
- '1178'
|
50
48
|
Ratelimit-Reset:
|
51
|
-
- '
|
49
|
+
- '1416100824'
|
52
50
|
Cache-Control:
|
53
51
|
- max-age=0, private, must-revalidate
|
54
52
|
X-Request-Id:
|
55
|
-
-
|
53
|
+
- b61bdf2d-6727-494a-b39f-bf0337c16004
|
56
54
|
X-Runtime:
|
57
|
-
- '0.
|
55
|
+
- '0.459922'
|
58
56
|
Cf-Ray:
|
59
|
-
-
|
57
|
+
- 189f9c94ccb50ec7-EWR
|
60
58
|
body:
|
61
59
|
encoding: UTF-8
|
62
60
|
string: '{"droplets":[{"id":2257086,"name":"www.gregf.org","memory":512,"vcpus":1,"disk":20,"locked":false,"status":"active","kernel":{"id":952,"name":"Debian
|
63
61
|
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-08-05T01:54:38Z","features":["private_networking","virtio"],"backup_ids":[],"snapshot_ids":[],"image":{"id":3445812,"name":"Debian
|
64
|
-
7.0 x64","distribution":"Debian","slug":null,"public":false,"regions":["nyc1","ams1","sfo1","nyc2","ams2","sgp1","lon1","nyc3","nyc2"],"created_at":"2014-05-02T18:16:21Z","
|
62
|
+
7.0 x64","distribution":"Debian","slug":null,"public":false,"regions":["nyc1","ams1","sfo1","nyc2","ams2","sgp1","lon1","nyc3","nyc2"],"created_at":"2014-05-02T18:16:21Z","min_disk_size":20},"size_slug":"512mb","networks":{"v4":[{"ip_address":"10.128.210.209","netmask":"255.255.0.0","gateway":"10.128.1.1","type":"private"},{"ip_address":"162.243.243.162","netmask":"255.255.255.0","gateway":"162.243.243.1","type":"public"}],"v6":[]},"region":{"name":"New
|
65
63
|
York 2","slug":"nyc2","sizes":[],"features":["virtio","private_networking","backups"],"available":null}},{"id":2463964,"name":"xmpp.gregf.org","memory":512,"vcpus":1,"disk":20,"locked":false,"status":"active","kernel":{"id":952,"name":"Debian
|
66
|
-
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-08-27T02:08:43Z","features":["virtio"],"backup_ids":[],"snapshot_ids":[],"image":{"id":5808360,"name":"xmpp-snapshot","distribution":"Debian","slug":null,"public":false,"regions":["nyc3"],"created_at":"2014-08-26T23:33:44Z","
|
64
|
+
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-08-27T02:08:43Z","features":["virtio"],"backup_ids":[],"snapshot_ids":[],"image":{"id":5808360,"name":"xmpp-snapshot","distribution":"Debian","slug":null,"public":false,"regions":["nyc3"],"created_at":"2014-08-26T23:33:44Z","min_disk_size":20},"size_slug":"512mb","networks":{"v4":[{"ip_address":"104.131.39.115","netmask":"255.255.192.0","gateway":"104.131.0.1","type":"public"}],"v6":[]},"region":{"name":"New
|
67
65
|
York 3","slug":"nyc3","sizes":[],"features":["virtio","private_networking","backups","ipv6","metadata"],"available":null}},{"id":2475760,"name":"mc.redneckscraft.com","memory":2048,"vcpus":2,"disk":40,"locked":false,"status":"active","kernel":{"id":952,"name":"Debian
|
68
66
|
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-08-27T20:50:17Z","features":["private_networking","ipv6","virtio"],"backup_ids":[],"snapshot_ids":[],"image":{"id":5562742,"name":"Debian
|
69
|
-
7.0 x64","distribution":"Debian","slug":null,"public":false,"regions":["nyc1","ams1","sfo1","nyc2","ams2","sgp1","lon1","nyc3","ams3","nyc2"],"created_at":"2014-08-07T19:10:55Z","
|
70
|
-
York 3","slug":"nyc3","sizes":[],"features":["virtio","private_networking","backups","ipv6","metadata"],"available":null}},
|
71
|
-
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-11-10T02:29:08Z","features":["virtio"],"backup_ids":[],"snapshot_ids":[7753256],"image":{"id":6372526,"name":"7.0
|
72
|
-
x64","distribution":"Debian","slug":"debian-7-0-x64","public":true,"regions":["nyc1","ams1","sfo1","nyc2","ams2","sgp1","lon1","nyc3","ams3","nyc3"],"created_at":"2014-09-26T16:52:46Z","min_size":"512mb"},"size_slug":"512mb","networks":{"v4":[{"ip_address":"104.236.29.97","netmask":"255.255.192.0","gateway":"104.236.0.1","type":"public"}],"v6":[]},"region":{"name":"New
|
73
|
-
York 3","slug":"nyc3","sizes":[],"features":["virtio","private_networking","backups","ipv6","metadata"],"available":null}}],"links":{},"meta":{"total":4}}'
|
67
|
+
7.0 x64","distribution":"Debian","slug":null,"public":false,"regions":["nyc1","ams1","sfo1","nyc2","ams2","sgp1","lon1","nyc3","ams3","nyc2"],"created_at":"2014-08-07T19:10:55Z","min_disk_size":20},"size_slug":"2gb","networks":{"v4":[{"ip_address":"10.132.252.47","netmask":"255.255.0.0","gateway":"10.132.0.1","type":"private"},{"ip_address":"104.131.47.109","netmask":"255.255.192.0","gateway":"104.131.0.1","type":"public"}],"v6":[{"ip_address":"2604:A880:0800:0010:0000:0000:0043:F001","netmask":64,"gateway":"2604:A880:0800:0010:0000:0000:0000:0001","type":"public"}]},"region":{"name":"New
|
68
|
+
York 3","slug":"nyc3","sizes":[],"features":["virtio","private_networking","backups","ipv6","metadata"],"available":null}}],"links":{},"meta":{"total":3}}'
|
74
69
|
http_version:
|
75
|
-
recorded_at:
|
70
|
+
recorded_at: Sun, 16 Nov 2014 00:35:59 GMT
|
76
71
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.digitalocean.com/v2/droplets/3195306/actions
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"power_off"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Bearer FAKE_ACCESS_TOKEN
|
14
|
+
User-Agent:
|
15
|
+
- Faraday v0.9.0
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- cloudflare-nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 18 Nov 2014 03:33:42 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
36
|
+
Status:
|
37
|
+
- 201 Created
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
X-Xss-Protection:
|
41
|
+
- 1; mode=block
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
Ratelimit-Limit:
|
45
|
+
- '1200'
|
46
|
+
Ratelimit-Remaining:
|
47
|
+
- '1188'
|
48
|
+
Ratelimit-Reset:
|
49
|
+
- '1416284457'
|
50
|
+
Etag:
|
51
|
+
- '"1bc3da4be4525c3ccefeb5adf66857cf"'
|
52
|
+
Cache-Control:
|
53
|
+
- max-age=0, private, must-revalidate
|
54
|
+
X-Request-Id:
|
55
|
+
- 32dc4a00-abd4-4d8b-96f1-2b491f05bc95
|
56
|
+
X-Runtime:
|
57
|
+
- '0.120867'
|
58
|
+
Cf-Ray:
|
59
|
+
- 18b11bad05190ecd-EWR
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"action":{"id":37043145,"status":"in-progress","type":"power_off","started_at":"2014-11-18T03:33:42Z","completed_at":null,"resource_id":3195306,"resource_type":"droplet","region":"nyc1"}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Tue, 18 Nov 2014 03:33:42 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,127 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.digitalocean.com/v2/droplets/3193966/actions
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"power_cycle"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Bearer FAKE_ACCESS_TOKEN
|
14
|
+
User-Agent:
|
15
|
+
- Faraday v0.9.0
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- cloudflare-nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 18 Nov 2014 01:45:59 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
36
|
+
Status:
|
37
|
+
- 201 Created
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
X-Xss-Protection:
|
41
|
+
- 1; mode=block
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
Ratelimit-Limit:
|
45
|
+
- '1200'
|
46
|
+
Ratelimit-Remaining:
|
47
|
+
- '1124'
|
48
|
+
Ratelimit-Reset:
|
49
|
+
- '1416274890'
|
50
|
+
Etag:
|
51
|
+
- '"101af51ace9699b82585e8eccb827f99"'
|
52
|
+
Cache-Control:
|
53
|
+
- max-age=0, private, must-revalidate
|
54
|
+
X-Request-Id:
|
55
|
+
- 9e5617cd-453c-45a7-a0d7-1f137640db5a
|
56
|
+
X-Runtime:
|
57
|
+
- '0.080858'
|
58
|
+
Cf-Ray:
|
59
|
+
- 18b07de2187a0ec7-EWR
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"action":{"id":37038185,"status":"in-progress","type":"power_cycle","started_at":"2014-11-18T01:45:59Z","completed_at":null,"resource_id":3193966,"resource_type":"droplet","region":"nyc3"}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Tue, 18 Nov 2014 01:45:59 GMT
|
65
|
+
- request:
|
66
|
+
method: get
|
67
|
+
uri: https://api.digitalocean.com/v2/droplets/3193966
|
68
|
+
body:
|
69
|
+
encoding: US-ASCII
|
70
|
+
string: ''
|
71
|
+
headers:
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
Authorization:
|
75
|
+
- Bearer FAKE_ACCESS_TOKEN
|
76
|
+
User-Agent:
|
77
|
+
- Faraday v0.9.0
|
78
|
+
Accept-Encoding:
|
79
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
80
|
+
Accept:
|
81
|
+
- "*/*"
|
82
|
+
response:
|
83
|
+
status:
|
84
|
+
code: 200
|
85
|
+
message: OK
|
86
|
+
headers:
|
87
|
+
Server:
|
88
|
+
- cloudflare-nginx
|
89
|
+
Date:
|
90
|
+
- Tue, 18 Nov 2014 01:46:02 GMT
|
91
|
+
Content-Type:
|
92
|
+
- application/json; charset=utf-8
|
93
|
+
Transfer-Encoding:
|
94
|
+
- chunked
|
95
|
+
Connection:
|
96
|
+
- keep-alive
|
97
|
+
Set-Cookie: _COOKIE_ID_
|
98
|
+
Status:
|
99
|
+
- 200 OK
|
100
|
+
X-Frame-Options:
|
101
|
+
- SAMEORIGIN
|
102
|
+
X-Xss-Protection:
|
103
|
+
- 1; mode=block
|
104
|
+
X-Content-Type-Options:
|
105
|
+
- nosniff
|
106
|
+
Ratelimit-Limit:
|
107
|
+
- '1200'
|
108
|
+
Ratelimit-Remaining:
|
109
|
+
- '1123'
|
110
|
+
Ratelimit-Reset:
|
111
|
+
- '1416275267'
|
112
|
+
Cache-Control:
|
113
|
+
- max-age=0, private, must-revalidate
|
114
|
+
X-Request-Id:
|
115
|
+
- 8721b3f7-6e49-4e20-853c-d966b8997887
|
116
|
+
X-Runtime:
|
117
|
+
- '0.173148'
|
118
|
+
Cf-Ray:
|
119
|
+
- 18b07df667200ecd-EWR
|
120
|
+
body:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"droplet":{"id":3193966,"name":"twerkit.gregf.org","memory":512,"vcpus":1,"disk":20,"locked":true,"status":"active","kernel":{"id":952,"name":"Debian
|
123
|
+
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-11-18T00:29:26Z","features":["virtio"],"backup_ids":[],"snapshot_ids":[8073571],"image":{"id":8073571,"name":"rebuild-snapshot","distribution":"Debian","slug":null,"public":false,"regions":["nyc3","nyc3"],"created_at":"2014-11-18T00:58:36Z","min_disk_size":20},"size_slug":"512mb","networks":{"v4":[{"ip_address":"104.236.29.101","netmask":"255.255.192.0","gateway":"104.236.0.1","type":"public"}],"v6":[]},"region":{"name":"New
|
124
|
+
York 3","slug":"nyc3","sizes":["32gb","16gb","2gb","1gb","4gb","8gb","512mb","64gb","48gb"],"features":["virtio","private_networking","backups","ipv6","metadata"],"available":true}}}'
|
125
|
+
http_version:
|
126
|
+
recorded_at: Tue, 18 Nov 2014 01:46:02 GMT
|
127
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,127 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.digitalocean.com/v2/droplets/3193966/actions
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"type":"reboot"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Bearer FAKE_ACCESS_TOKEN
|
14
|
+
User-Agent:
|
15
|
+
- Faraday v0.9.0
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- cloudflare-nginx
|
27
|
+
Date:
|
28
|
+
- Tue, 18 Nov 2014 01:41:07 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie: _COOKIE_ID_
|
36
|
+
Status:
|
37
|
+
- 201 Created
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
X-Xss-Protection:
|
41
|
+
- 1; mode=block
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
Ratelimit-Limit:
|
45
|
+
- '1200'
|
46
|
+
Ratelimit-Remaining:
|
47
|
+
- '1122'
|
48
|
+
Ratelimit-Reset:
|
49
|
+
- '1416274185'
|
50
|
+
Etag:
|
51
|
+
- '"ea16d151f923280378c717a31aaad83e"'
|
52
|
+
Cache-Control:
|
53
|
+
- max-age=0, private, must-revalidate
|
54
|
+
X-Request-Id:
|
55
|
+
- 54ec5e08-8122-4e3d-a487-093b8998dcb0
|
56
|
+
X-Runtime:
|
57
|
+
- '0.162645'
|
58
|
+
Cf-Ray:
|
59
|
+
- 18b076bdd9640ec7-EWR
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"action":{"id":37037990,"status":"in-progress","type":"reboot","started_at":"2014-11-18T01:41:07Z","completed_at":null,"resource_id":3193966,"resource_type":"droplet","region":"nyc3"}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Tue, 18 Nov 2014 01:41:07 GMT
|
65
|
+
- request:
|
66
|
+
method: get
|
67
|
+
uri: https://api.digitalocean.com/v2/droplets/3193966
|
68
|
+
body:
|
69
|
+
encoding: US-ASCII
|
70
|
+
string: ''
|
71
|
+
headers:
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
Authorization:
|
75
|
+
- Bearer FAKE_ACCESS_TOKEN
|
76
|
+
User-Agent:
|
77
|
+
- Faraday v0.9.0
|
78
|
+
Accept-Encoding:
|
79
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
80
|
+
Accept:
|
81
|
+
- "*/*"
|
82
|
+
response:
|
83
|
+
status:
|
84
|
+
code: 200
|
85
|
+
message: OK
|
86
|
+
headers:
|
87
|
+
Server:
|
88
|
+
- cloudflare-nginx
|
89
|
+
Date:
|
90
|
+
- Tue, 18 Nov 2014 01:41:10 GMT
|
91
|
+
Content-Type:
|
92
|
+
- application/json; charset=utf-8
|
93
|
+
Transfer-Encoding:
|
94
|
+
- chunked
|
95
|
+
Connection:
|
96
|
+
- keep-alive
|
97
|
+
Set-Cookie: _COOKIE_ID_
|
98
|
+
Status:
|
99
|
+
- 200 OK
|
100
|
+
X-Frame-Options:
|
101
|
+
- SAMEORIGIN
|
102
|
+
X-Xss-Protection:
|
103
|
+
- 1; mode=block
|
104
|
+
X-Content-Type-Options:
|
105
|
+
- nosniff
|
106
|
+
Ratelimit-Limit:
|
107
|
+
- '1200'
|
108
|
+
Ratelimit-Remaining:
|
109
|
+
- '1121'
|
110
|
+
Ratelimit-Reset:
|
111
|
+
- '1416274890'
|
112
|
+
Cache-Control:
|
113
|
+
- max-age=0, private, must-revalidate
|
114
|
+
X-Request-Id:
|
115
|
+
- 79774f3b-ac64-450f-9603-0e8a32ac35d6
|
116
|
+
X-Runtime:
|
117
|
+
- '0.125194'
|
118
|
+
Cf-Ray:
|
119
|
+
- 18b076d3a4aa0ecd-EWR
|
120
|
+
body:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"droplet":{"id":3193966,"name":"twerkit.gregf.org","memory":512,"vcpus":1,"disk":20,"locked":true,"status":"active","kernel":{"id":952,"name":"Debian
|
123
|
+
7.0 x64 vmlinuz-3.2.0-4-amd64 (3.2.54-2)","version":"3.2.0-4-amd64"},"created_at":"2014-11-18T00:29:26Z","features":["virtio"],"backup_ids":[],"snapshot_ids":[8073571],"image":{"id":8073571,"name":"rebuild-snapshot","distribution":"Debian","slug":null,"public":false,"regions":["nyc3","nyc3"],"created_at":"2014-11-18T00:58:36Z","min_disk_size":20},"size_slug":"512mb","networks":{"v4":[{"ip_address":"104.236.29.101","netmask":"255.255.192.0","gateway":"104.236.0.1","type":"public"}],"v6":[]},"region":{"name":"New
|
124
|
+
York 3","slug":"nyc3","sizes":["32gb","16gb","2gb","1gb","4gb","8gb","512mb","64gb","48gb"],"features":["virtio","private_networking","backups","ipv6","metadata"],"available":true}}}'
|
125
|
+
http_version:
|
126
|
+
recorded_at: Tue, 18 Nov 2014 01:41:10 GMT
|
127
|
+
recorded_with: VCR 2.9.3
|