droplet_kit 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +4 -1
  3. data/lib/droplet_kit/mappings/cdn_mapping.rb +6 -0
  4. data/lib/droplet_kit/mappings/load_balancer_mapping.rb +1 -0
  5. data/lib/droplet_kit/models/cdn.rb +2 -0
  6. data/lib/droplet_kit/models/load_balancer.rb +1 -0
  7. data/lib/droplet_kit/resources/cdn_resource.rb +6 -0
  8. data/lib/droplet_kit/version.rb +1 -1
  9. metadata +4 -289
  10. data/.gitignore +0 -23
  11. data/.rspec +0 -2
  12. data/.travis.yml +0 -28
  13. data/CHANGELOG.md +0 -106
  14. data/Gemfile +0 -15
  15. data/Rakefile +0 -3
  16. data/droplet_kit.gemspec +0 -37
  17. data/spec/fixtures/account/info.json +0 -8
  18. data/spec/fixtures/actions/all.json +0 -24
  19. data/spec/fixtures/actions/find.json +0 -19
  20. data/spec/fixtures/cdns/all.json +0 -16
  21. data/spec/fixtures/cdns/create.json +0 -9
  22. data/spec/fixtures/cdns/find.json +0 -9
  23. data/spec/fixtures/cdns/update_ttl.json +0 -9
  24. data/spec/fixtures/certificates/all.json +0 -19
  25. data/spec/fixtures/certificates/find.json +0 -12
  26. data/spec/fixtures/certificates/lets_encrypt.json +0 -12
  27. data/spec/fixtures/domain_records/all.json +0 -57
  28. data/spec/fixtures/domain_records/create.json +0 -12
  29. data/spec/fixtures/domain_records/find.json +0 -12
  30. data/spec/fixtures/domain_records/update.json +0 -12
  31. data/spec/fixtures/domains/all.json +0 -12
  32. data/spec/fixtures/domains/create.json +0 -7
  33. data/spec/fixtures/domains/find.json +0 -7
  34. data/spec/fixtures/droplet_actions/change_kernel.json +0 -27
  35. data/spec/fixtures/droplet_actions/disable_backups.json +0 -27
  36. data/spec/fixtures/droplet_actions/enable_backups.json +0 -27
  37. data/spec/fixtures/droplet_actions/enable_ipv6.json +0 -27
  38. data/spec/fixtures/droplet_actions/enable_private_networking.json +0 -27
  39. data/spec/fixtures/droplet_actions/find.json +0 -19
  40. data/spec/fixtures/droplet_actions/password_reset.json +0 -27
  41. data/spec/fixtures/droplet_actions/power_cycle.json +0 -27
  42. data/spec/fixtures/droplet_actions/power_off.json +0 -27
  43. data/spec/fixtures/droplet_actions/power_on.json +0 -27
  44. data/spec/fixtures/droplet_actions/reboot.json +0 -27
  45. data/spec/fixtures/droplet_actions/rebuild.json +0 -27
  46. data/spec/fixtures/droplet_actions/rename.json +0 -27
  47. data/spec/fixtures/droplet_actions/resize.json +0 -27
  48. data/spec/fixtures/droplet_actions/restore.json +0 -27
  49. data/spec/fixtures/droplet_actions/shutdown.json +0 -27
  50. data/spec/fixtures/droplet_actions/snapshot.json +0 -27
  51. data/spec/fixtures/droplet_actions/upgrade.json +0 -27
  52. data/spec/fixtures/droplet_upgrades/all.json +0 -7
  53. data/spec/fixtures/droplets/all.json +0 -89
  54. data/spec/fixtures/droplets/all_empty.json +0 -7
  55. data/spec/fixtures/droplets/create.json +0 -84
  56. data/spec/fixtures/droplets/create_multiple.json +0 -168
  57. data/spec/fixtures/droplets/find.json +0 -84
  58. data/spec/fixtures/droplets/list_actions.json +0 -24
  59. data/spec/fixtures/droplets/list_backups.json +0 -18
  60. data/spec/fixtures/droplets/list_kernels.json +0 -17
  61. data/spec/fixtures/droplets/list_snapshots.json +0 -18
  62. data/spec/fixtures/firewalls/all.json +0 -67
  63. data/spec/fixtures/firewalls/find.json +0 -61
  64. data/spec/fixtures/floating_ip_actions/all.json +0 -41
  65. data/spec/fixtures/floating_ip_actions/assign.json +0 -27
  66. data/spec/fixtures/floating_ip_actions/find.json +0 -19
  67. data/spec/fixtures/floating_ip_actions/unassign.json +0 -27
  68. data/spec/fixtures/floating_ips/all.json +0 -186
  69. data/spec/fixtures/floating_ips/all_empty.json +0 -7
  70. data/spec/fixtures/floating_ips/create.json +0 -29
  71. data/spec/fixtures/floating_ips/create_with_droplet.json +0 -44
  72. data/spec/fixtures/floating_ips/find.json +0 -28
  73. data/spec/fixtures/image_actions/all.json +0 -36
  74. data/spec/fixtures/image_actions/convert.json +0 -27
  75. data/spec/fixtures/image_actions/find.json +0 -19
  76. data/spec/fixtures/image_actions/transfer.json +0 -27
  77. data/spec/fixtures/images/all.json +0 -31
  78. data/spec/fixtures/images/find.json +0 -16
  79. data/spec/fixtures/images/private.json +0 -31
  80. data/spec/fixtures/images/type.json +0 -31
  81. data/spec/fixtures/kubernetes/all.json +0 -70
  82. data/spec/fixtures/kubernetes/all_empty.json +0 -7
  83. data/spec/fixtures/kubernetes/cluster_node_pool.json +0 -24
  84. data/spec/fixtures/kubernetes/cluster_node_pool_create.json +0 -40
  85. data/spec/fixtures/kubernetes/cluster_node_pool_update.json +0 -31
  86. data/spec/fixtures/kubernetes/cluster_node_pools.json +0 -33
  87. data/spec/fixtures/kubernetes/clusters/create.json +0 -65
  88. data/spec/fixtures/kubernetes/clusters/find.json +0 -65
  89. data/spec/fixtures/kubernetes/clusters/kubeconfig.txt +0 -20
  90. data/spec/fixtures/kubernetes/clusters/update.json +0 -63
  91. data/spec/fixtures/kubernetes/options.json +0 -150
  92. data/spec/fixtures/load_balancers/all.json +0 -129
  93. data/spec/fixtures/load_balancers/find.json +0 -59
  94. data/spec/fixtures/projects/all.json +0 -37
  95. data/spec/fixtures/projects/all_empty.json +0 -12
  96. data/spec/fixtures/projects/find.json +0 -14
  97. data/spec/fixtures/projects/resources.json +0 -84
  98. data/spec/fixtures/regions/all.json +0 -47
  99. data/spec/fixtures/sizes/all.json +0 -37
  100. data/spec/fixtures/snapshots/all.json +0 -32
  101. data/spec/fixtures/snapshots/find.json +0 -14
  102. data/spec/fixtures/snapshots/resource_type.json +0 -20
  103. data/spec/fixtures/ssh_keys/all.json +0 -13
  104. data/spec/fixtures/ssh_keys/create.json +0 -8
  105. data/spec/fixtures/ssh_keys/find.json +0 -8
  106. data/spec/fixtures/ssh_keys/update.json +0 -8
  107. data/spec/fixtures/tags/all.json +0 -34
  108. data/spec/fixtures/tags/all_empty.json +0 -7
  109. data/spec/fixtures/tags/create.json +0 -15
  110. data/spec/fixtures/tags/find.json +0 -99
  111. data/spec/fixtures/volume_actions/all.json +0 -41
  112. data/spec/fixtures/volume_actions/attach.json +0 -34
  113. data/spec/fixtures/volume_actions/detach.json +0 -34
  114. data/spec/fixtures/volume_actions/find.json +0 -34
  115. data/spec/fixtures/volume_actions/resize.json +0 -34
  116. data/spec/fixtures/volumes/all.json +0 -41
  117. data/spec/fixtures/volumes/create.json +0 -34
  118. data/spec/fixtures/volumes/create_snapshot.json +0 -14
  119. data/spec/fixtures/volumes/find.json +0 -34
  120. data/spec/lib/droplet_kit/client_spec.rb +0 -102
  121. data/spec/lib/droplet_kit/models/base_model_spec.rb +0 -21
  122. data/spec/lib/droplet_kit/models/droplet_spec.rb +0 -32
  123. data/spec/lib/droplet_kit/paginated_resource_spec.rb +0 -85
  124. data/spec/lib/droplet_kit/resources/account_resource_spec.rb +0 -30
  125. data/spec/lib/droplet_kit/resources/action_resource_spec.rb +0 -83
  126. data/spec/lib/droplet_kit/resources/cdn_resource_spec.rb +0 -124
  127. data/spec/lib/droplet_kit/resources/certificate_resource_spec.rb +0 -119
  128. data/spec/lib/droplet_kit/resources/domain_record_resource_spec.rb +0 -99
  129. data/spec/lib/droplet_kit/resources/domain_resource_spec.rb +0 -65
  130. data/spec/lib/droplet_kit/resources/droplet_action_resource_spec.rb +0 -223
  131. data/spec/lib/droplet_kit/resources/droplet_resource_spec.rb +0 -340
  132. data/spec/lib/droplet_kit/resources/droplet_upgrade_resource_spec.rb +0 -22
  133. data/spec/lib/droplet_kit/resources/firewall_resource_spec.rb +0 -265
  134. data/spec/lib/droplet_kit/resources/floating_ip_action_resource_spec.rb +0 -137
  135. data/spec/lib/droplet_kit/resources/floating_ip_resource_spec.rb +0 -91
  136. data/spec/lib/droplet_kit/resources/image_action_resource_spec.rb +0 -149
  137. data/spec/lib/droplet_kit/resources/image_resource_spec.rb +0 -93
  138. data/spec/lib/droplet_kit/resources/kubernetes_cluster_resource_spec.rb +0 -313
  139. data/spec/lib/droplet_kit/resources/kubernetes_options_resource_spec.rb +0 -33
  140. data/spec/lib/droplet_kit/resources/load_balancer_resource_spec.rb +0 -213
  141. data/spec/lib/droplet_kit/resources/project_resource_spec.rb +0 -126
  142. data/spec/lib/droplet_kit/resources/region_resource_spec.rb +0 -27
  143. data/spec/lib/droplet_kit/resources/size_resource_spec.rb +0 -27
  144. data/spec/lib/droplet_kit/resources/snapshot_resource_spec.rb +0 -61
  145. data/spec/lib/droplet_kit/resources/ssh_key_resource_spec.rb +0 -92
  146. data/spec/lib/droplet_kit/resources/tag_resource_spec.rb +0 -135
  147. data/spec/lib/droplet_kit/resources/volume_action_resource_spec.rb +0 -157
  148. data/spec/lib/droplet_kit/resources/volume_resource_spec.rb +0 -124
  149. data/spec/spec_helper.rb +0 -19
  150. data/spec/support/fake_server.rb +0 -4
  151. data/spec/support/request_stub_helpers.rb +0 -28
  152. data/spec/support/resource_context.rb +0 -4
  153. data/spec/support/shared_examples/common_errors.rb +0 -27
  154. data/spec/support/shared_examples/paginated_endpoint.rb +0 -16
  155. data/spec/support/shared_examples/unprocessable_entity.rb +0 -11
@@ -1,14 +0,0 @@
1
- {
2
- "snapshot": {
3
- "id": "7724db7c-e098-11e5-b522-000f53304e51",
4
- "name": "Ubuntu Foo",
5
- "regions": [
6
- "nyc1"
7
- ],
8
- "created_at": "2014-07-29T14:35:40Z",
9
- "resource_type": "volume",
10
- "resource_id": "7724db7c-e098-11e5-b522-000f53304e51",
11
- "min_disk_size": 10,
12
- "size_gigabytes": 0.4
13
- }
14
- }
@@ -1,20 +0,0 @@
1
- {
2
- "snapshots": [
3
- {
4
- "id": "119192817",
5
- "name": "Ubuntu 13.04",
6
- "regions": [
7
- "nyc1"
8
- ],
9
- "created_at": "2014-07-29T14:35:40Z",
10
- "resource_type": "droplet",
11
- "resource_id": "123",
12
- "resource_type": "droplet",
13
- "min_disk_size": 10,
14
- "size_gigabytes": 0.4
15
- }
16
- ],
17
- "meta": {
18
- "total": 1
19
- }
20
- }
@@ -1,13 +0,0 @@
1
- {
2
- "ssh_keys": [
3
- {
4
- "id": 1,
5
- "fingerprint": "f5:d1:78:ed:28:72:5f:e1:ac:94:fd:1f:e0:a3:48:6d",
6
- "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDGk5V68BJ4P3Ereh779Vi/Ft2qs/rbXrcjKLGo6zsyeyFUE0svJUpRDEJvFSf8RlezKx1/1ulJu9+kZsxRiUKn example",
7
- "name": "Example Key"
8
- }
9
- ],
10
- "meta": {
11
- "total": 1
12
- }
13
- }
@@ -1,8 +0,0 @@
1
- {
2
- "ssh_key": {
3
- "id": 2,
4
- "fingerprint": "bf:3a:82:fc:4a:25:0b:a3:23:97:fb:4e:e4:88:e1:0e",
5
- "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDbW5JSFLg70Z0/MNNUncNgfxnrHfjBSlWzyF3e+3tNLUVgGagZISnzF4Y03/aS79aiCmbd4vCEcxyB4Wxtpddh example",
6
- "name": "Example Key"
7
- }
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "ssh_key": {
3
- "id": 3,
4
- "fingerprint": "32:af:23:06:21:fb:e6:5b:d3:cc:7f:b7:00:0f:79:aa",
5
- "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDZEgsAbWmQF+f8TU3F4fCg4yjVzdKudQbbhGb+qRKP5ju4Yo0Zzneia+oFm4bfzG+ydxUlOlbzq+Tpoj+INFv5 example",
6
- "name": "Example Key"
7
- }
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "ssh_key": {
3
- "id": 123,
4
- "fingerprint": "32:af:23:06:21:fb:e6:5b:d3:cc:7f:b7:00:0f:79:aa",
5
- "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDZEgsAbWmQF+f8TU3F4fCg4yjVzdKudQbbhGb+qRKP5ju4Yo0Zzneia+oFm4bfzG+ydxUlOlbzq+Tpoj+INFv5 example",
6
- "name": "Example Key"
7
- }
8
- }
@@ -1,34 +0,0 @@
1
- {
2
- "tags": [
3
- {
4
- "name": "testing-1",
5
- "resources": {
6
- "count": 0,
7
- "droplets": {
8
- "count": 0,
9
- "last_tagged": null
10
- },
11
- "images": {
12
- "count": 0
13
- }
14
- }
15
- },
16
- {
17
- "name": "testing-2",
18
- "resources": {
19
- "count": 0,
20
- "droplets": {
21
- "count": 0,
22
- "last_tagged": null
23
- },
24
- "images": {
25
- "count": 0
26
- }
27
- }
28
- }
29
- ],
30
- "links": {},
31
- "meta": {
32
- "total": 2
33
- }
34
- }
@@ -1,7 +0,0 @@
1
- {
2
- "tags": [
3
- ],
4
- "meta": {
5
- "total": 0
6
- }
7
- }
@@ -1,15 +0,0 @@
1
- {
2
- "tag": {
3
- "name": "testing-1",
4
- "resources": {
5
- "count": 0,
6
- "droplets": {
7
- "count": 0,
8
- "last_tagged": null
9
- },
10
- "images": {
11
- "count": 0
12
- }
13
- }
14
- }
15
- }
@@ -1,99 +0,0 @@
1
- {
2
- "tag": {
3
- "name": "testing-1",
4
- "resources": {
5
- "count": 2,
6
- "last_tagged_uri": "https://api.digitalocean.com/v2/droplets/1",
7
- "droplets": {
8
- "count": 1,
9
- "last_tagged_uri": "https://api.digitalocean.com/v2/droplets/1",
10
- "last_tagged": {
11
- "id": 1,
12
- "name": "test.example.com",
13
- "memory": 1024,
14
- "vcpus": 2,
15
- "disk": 20,
16
- "region": {
17
- "slug": "nyc1",
18
- "name": "New York",
19
- "sizes": [
20
- "1024mb",
21
- "512mb"
22
- ],
23
- "available": true,
24
- "features": [
25
- "virtio",
26
- "private_networking",
27
- "backups",
28
- "ipv6"
29
- ]
30
- },
31
- "image": {
32
- "id": 119192817,
33
- "name": "Ubuntu 13.04",
34
- "distribution": "ubuntu",
35
- "slug": "ubuntu1304",
36
- "public": true,
37
- "regions": [
38
- "nyc1"
39
- ],
40
- "created_at": "2014-07-29T14:35:37Z"
41
- },
42
- "size_slug": "1024mb",
43
- "locked": false,
44
- "status": "active",
45
- "networks": {
46
- "v4": [
47
- {
48
- "ip_address": "10.0.0.19",
49
- "netmask": "255.255.0.0",
50
- "gateway": "10.0.0.1",
51
- "type": "private"
52
- },
53
- {
54
- "ip_address": "127.0.0.19",
55
- "netmask": "255.255.255.0",
56
- "gateway": "127.0.0.20",
57
- "type": "public"
58
- }
59
- ],
60
- "v6": [
61
- {
62
- "ip_address": "2001::13",
63
- "cidr": 124,
64
- "gateway": "2400:6180:0000:00D0:0000:0000:0009:7000",
65
- "type": "public"
66
- }
67
- ]
68
- },
69
- "kernel": {
70
- "id": 485432985,
71
- "name": "DO-recovery-static-fsck",
72
- "version": "3.8.0-25-generic"
73
- },
74
- "created_at": "2014-07-29T14:35:37Z",
75
- "features": [
76
- "ipv6"
77
- ],
78
- "backup_ids": [
79
- 449676382
80
- ],
81
- "snapshot_ids": [
82
- 449676383
83
- ],
84
- "action_ids": [
85
-
86
- ],
87
- "tags": [
88
- "testing-1",
89
- "testing-2"
90
- ]
91
- }
92
- },
93
- "images": {
94
- "count": 1,
95
- "last_tagged_uri": "https://api.digitalocean.com/v2/images/146"
96
- }
97
- }
98
- }
99
- }
@@ -1,41 +0,0 @@
1
- {
2
- "actions": [
3
- {
4
- "id": 72531856,
5
- "status": "in-progress",
6
- "type": "attach_volume",
7
- "started_at": "2015-11-12T17:51:03Z",
8
- "completed_at": null,
9
- "resource_id": null,
10
- "resource_type": "volume",
11
- "region": {
12
- "name": "New York 1",
13
- "slug": "nyc1",
14
- "sizes": [
15
- "1gb",
16
- "2gb",
17
- "4gb",
18
- "8gb",
19
- "32gb",
20
- "64gb",
21
- "512mb",
22
- "48gb",
23
- "16gb"
24
- ],
25
- "features": [
26
- "private_networking",
27
- "backups",
28
- "ipv6",
29
- "metadata"
30
- ],
31
- "available": true
32
- },
33
- "region_slug": "nyc1"
34
- }
35
- ],
36
- "links": {
37
- },
38
- "meta": {
39
- "total": 1
40
- }
41
- }
@@ -1,34 +0,0 @@
1
- {
2
- "action": {
3
- "id": 72531856,
4
- "status": "in-progress",
5
- "type": "attach_volume",
6
- "started_at": "2015-11-12T17:51:03Z",
7
- "completed_at": null,
8
- "resource_id": null,
9
- "resource_type": "volume",
10
- "region": {
11
- "name": "New York 1",
12
- "slug": "nyc1",
13
- "sizes": [
14
- "1gb",
15
- "2gb",
16
- "4gb",
17
- "8gb",
18
- "32gb",
19
- "64gb",
20
- "512mb",
21
- "48gb",
22
- "16gb"
23
- ],
24
- "features": [
25
- "private_networking",
26
- "backups",
27
- "ipv6",
28
- "metadata"
29
- ],
30
- "available": true
31
- },
32
- "region_slug": "nyc1"
33
- }
34
- }
@@ -1,34 +0,0 @@
1
- {
2
- "action": {
3
- "id": 72531856,
4
- "status": "in-progress",
5
- "type": "detach_volume",
6
- "started_at": "2015-11-12T17:51:03Z",
7
- "completed_at": null,
8
- "resource_id": null,
9
- "resource_type": "volume",
10
- "region": {
11
- "name": "New York 1",
12
- "slug": "nyc1",
13
- "sizes": [
14
- "512mb",
15
- "1gb",
16
- "2gb",
17
- "4gb",
18
- "8gb",
19
- "16gb",
20
- "32gb",
21
- "48gb",
22
- "64gb"
23
- ],
24
- "features": [
25
- "private_networking",
26
- "backups",
27
- "ipv6",
28
- "metadata"
29
- ],
30
- "available": true
31
- },
32
- "region_slug": "nyc1"
33
- }
34
- }
@@ -1,34 +0,0 @@
1
- {
2
- "action": {
3
- "id": 72531856,
4
- "status": "in-progress",
5
- "type": "attach_volume",
6
- "started_at": "2015-11-12T17:51:03Z",
7
- "completed_at": null,
8
- "resource_id": null,
9
- "resource_type": "volume",
10
- "region": {
11
- "name": "New York 1",
12
- "slug": "nyc1",
13
- "sizes": [
14
- "1gb",
15
- "2gb",
16
- "4gb",
17
- "8gb",
18
- "32gb",
19
- "64gb",
20
- "512mb",
21
- "48gb",
22
- "16gb"
23
- ],
24
- "features": [
25
- "private_networking",
26
- "backups",
27
- "ipv6",
28
- "metadata"
29
- ],
30
- "available": true
31
- },
32
- "region_slug": "nyc1"
33
- }
34
- }
@@ -1,34 +0,0 @@
1
- {
2
- "action": {
3
- "id": 72531856,
4
- "status": "in-progress",
5
- "type": "resize_volume",
6
- "started_at": "2015-11-12T17:51:03Z",
7
- "completed_at": null,
8
- "resource_id": null,
9
- "resource_type": "volume",
10
- "region": {
11
- "name": "New York 1",
12
- "slug": "nyc1",
13
- "sizes": [
14
- "512mb",
15
- "1gb",
16
- "2gb",
17
- "4gb",
18
- "8gb",
19
- "16gb",
20
- "32gb",
21
- "48gb",
22
- "64gb"
23
- ],
24
- "features": [
25
- "private_networking",
26
- "backups",
27
- "ipv6",
28
- "metadata"
29
- ],
30
- "available": true
31
- },
32
- "region_slug": "nyc1"
33
- }
34
- }
@@ -1,41 +0,0 @@
1
- {
2
- "volumes": [
3
- {
4
- "id": "7724db7c-e098-11e5-b522-000f53304e51",
5
- "region": {
6
- "name": "New York 1",
7
- "slug": "nyc1",
8
- "sizes": [
9
- "512mb",
10
- "1gb",
11
- "2gb",
12
- "4gb",
13
- "8gb",
14
- "16gb",
15
- "32gb",
16
- "48gb",
17
- "64gb"
18
- ],
19
- "features": [
20
- "private_networking",
21
- "backups",
22
- "ipv6",
23
- "metadata"
24
- ],
25
- "available": true
26
- },
27
- "droplet_ids": [
28
-
29
- ],
30
- "name": "Example",
31
- "description": "Block store for examples",
32
- "size_gigabytes": 10,
33
- "created_at": "2016-03-02T17:00:49Z"
34
- }
35
- ],
36
- "links": {
37
- },
38
- "meta": {
39
- "total": 1
40
- }
41
- }