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,24 +0,0 @@
1
- {
2
- "actions": [
3
- {
4
- "id": 19,
5
- "status": "in-progress",
6
- "type": "create",
7
- "started_at": "2014-07-29T14:35:39Z",
8
- "completed_at": null,
9
- "resource_id": 24,
10
- "resource_type": "droplet",
11
- "region_slug": "nyc1",
12
- "region": {
13
- "name": "New York",
14
- "slug": "nyc1",
15
- "available": true,
16
- "sizes": ["512mb"],
17
- "features": ["virtio", "private_networking", "backups", "ipv6", "metadata"]
18
- }
19
- }
20
- ],
21
- "meta": {
22
- "total": 1
23
- }
24
- }
@@ -1,18 +0,0 @@
1
- {
2
- "backups": [
3
- {
4
- "id": 449676388,
5
- "name": "Ubuntu 13.04",
6
- "distribution": "ubuntu",
7
- "slug": null,
8
- "public": false,
9
- "regions": [
10
- "nyc1"
11
- ],
12
- "created_at": "2014-07-29T14:35:38Z"
13
- }
14
- ],
15
- "meta": {
16
- "total": 1
17
- }
18
- }
@@ -1,17 +0,0 @@
1
- {
2
- "kernels": [
3
- {
4
- "id": 61833229,
5
- "name": "Ubuntu 14.04 x32 vmlinuz-3.13.0-24-generic",
6
- "version": "3.13.0-24-generic"
7
- },
8
- {
9
- "id": 485432972,
10
- "name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-24-generic (1221)",
11
- "version": "3.13.0-24-generic"
12
- }
13
- ],
14
- "meta": {
15
- "total": 2
16
- }
17
- }
@@ -1,18 +0,0 @@
1
- {
2
- "snapshots": [
3
- {
4
- "id": 449676387,
5
- "name": "Ubuntu 13.04",
6
- "distribution": "ubuntu",
7
- "slug": null,
8
- "public": false,
9
- "regions": [
10
- "nyc1"
11
- ],
12
- "created_at": "2014-07-29T14:35:38Z"
13
- }
14
- ],
15
- "meta": {
16
- "total": 1
17
- }
18
- }
@@ -1,67 +0,0 @@
1
- {
2
- "firewalls": [
3
- {
4
- "id": "11d87802-df17-4f8f-a691-58e408570c12",
5
- "name": "firewall",
6
- "status": "succeeded",
7
- "inbound_rules": [
8
- {
9
- "protocol": "icmp",
10
- "ports": "0",
11
- "sources": {
12
- "load_balancer_uids": [
13
- "d2d3920a-9d45-41b0-b018-d15e18ec60a4"
14
- ],
15
- "tags": [
16
- "backend"
17
- ]
18
- }
19
- },
20
- {
21
- "protocol": "tcp",
22
- "ports": "8000-9000",
23
- "sources": {
24
- "addresses": [
25
- "0.0.0.0/0"
26
- ]
27
- }
28
- }
29
- ],
30
- "outbound_rules": [
31
- {
32
- "protocol": "icmp",
33
- "ports": "0",
34
- "destinations": {
35
- "tags": [
36
- "backend"
37
- ]
38
- }
39
- },
40
- {
41
- "protocol": "tcp",
42
- "ports": "8000-9000",
43
- "destinations": {
44
- "addresses": [
45
- "127.0.0.0"
46
- ],
47
- "droplet_ids": [
48
- 345
49
- ]
50
- }
51
- }
52
- ],
53
- "created_at": "2017-05-30T16:25:21Z",
54
- "droplet_ids": [
55
- 123
56
- ],
57
- "tags": [
58
- "backend"
59
- ],
60
- "pending_changes": []
61
- }
62
- ],
63
- "links": {},
64
- "meta": {
65
- "total": 1
66
- }
67
- }
@@ -1,61 +0,0 @@
1
- {
2
- "firewall": {
3
- "id": "11d87802-df17-4f8f-a691-58e408570c12",
4
- "name": "firewall",
5
- "status": "succeeded",
6
- "inbound_rules": [
7
- {
8
- "protocol": "icmp",
9
- "ports": "0",
10
- "sources": {
11
- "load_balancer_uids": [
12
- "d2d3920a-9d45-41b0-b018-d15e18ec60a4"
13
- ],
14
- "tags": [
15
- "backend"
16
- ]
17
- }
18
- },
19
- {
20
- "protocol": "tcp",
21
- "ports": "8000-9000",
22
- "sources": {
23
- "addresses": [
24
- "0.0.0.0/0"
25
- ]
26
- }
27
- }
28
- ],
29
- "outbound_rules": [
30
- {
31
- "protocol": "icmp",
32
- "ports": "0",
33
- "destinations": {
34
- "tags": [
35
- "backend"
36
- ]
37
- }
38
- },
39
- {
40
- "protocol": "tcp",
41
- "ports": "8000-9000",
42
- "destinations": {
43
- "addresses": [
44
- "127.0.0.0"
45
- ],
46
- "droplet_ids": [
47
- 345
48
- ]
49
- }
50
- }
51
- ],
52
- "created_at": "2017-05-30T16:25:21Z",
53
- "droplet_ids": [
54
- 123
55
- ],
56
- "tags": [
57
- "backend"
58
- ],
59
- "pending_changes": []
60
- }
61
- }
@@ -1,41 +0,0 @@
1
- {
2
- "actions": [
3
- {
4
- "id": 19,
5
- "status": "completed",
6
- "type": "assign_ip",
7
- "started_at": "2014-10-28T17:11:05Z",
8
- "completed_at": "2014-10-28T17:11:06Z",
9
- "resource_id": 45646587,
10
- "resource_type": "floating_ip",
11
- "region_slug": "nyc1",
12
- "region": {
13
- "name": "New York",
14
- "slug": "nyc1",
15
- "available": true,
16
- "sizes": ["512mb"],
17
- "features": ["virtio", "private_networking", "backups", "ipv6", "metadata"]
18
- }
19
- },
20
- {
21
- "id": 20,
22
- "status": "completed",
23
- "type": "release_ip",
24
- "started_at": "2014-10-28T17:11:05Z",
25
- "completed_at": "2014-10-28T17:11:06Z",
26
- "resource_id": 45646587,
27
- "resource_type": "floating_ip",
28
- "region_slug": "nyc1",
29
- "region": {
30
- "name": "New York",
31
- "slug": "nyc1",
32
- "available": true,
33
- "sizes": ["512mb"],
34
- "features": ["virtio", "private_networking", "backups", "ipv6", "metadata"]
35
- }
36
- }
37
- ],
38
- "meta": {
39
- "total": 2
40
- }
41
- }
@@ -1,27 +0,0 @@
1
- {
2
- "action": {
3
- "id": 2,
4
- "status": "in-progress",
5
- "type": "assign",
6
- "started_at": "2014-08-05T15:15:28Z",
7
- "completed_at": null,
8
- "resource_id": 12,
9
- "resource_type": "floating_ip",
10
- "region_slug": "nyc1",
11
- "region": {
12
- "name": "New York",
13
- "slug": "nyc1",
14
- "available": true,
15
- "sizes": [
16
- "512mb"
17
- ],
18
- "features": [
19
- "virtio",
20
- "private_networking",
21
- "backups",
22
- "ipv6",
23
- "metadata"
24
- ]
25
- }
26
- }
27
- }
@@ -1,19 +0,0 @@
1
- {
2
- "action": {
3
- "id": 19,
4
- "status": "completed",
5
- "type": "assign_ip",
6
- "started_at": "2014-10-28T17:11:05Z",
7
- "completed_at": "2014-10-28T17:11:06Z",
8
- "resource_id": 45646587,
9
- "resource_type": "floating_ip",
10
- "region_slug": "nyc1",
11
- "region": {
12
- "name": "New York",
13
- "slug": "nyc1",
14
- "available": true,
15
- "sizes": ["512mb"],
16
- "features": ["virtio", "private_networking", "backups", "ipv6", "metadata"]
17
- }
18
- }
19
- }
@@ -1,27 +0,0 @@
1
- {
2
- "action": {
3
- "id": 2,
4
- "status": "in-progress",
5
- "type": "unassign",
6
- "started_at": "2014-08-05T15:15:28Z",
7
- "completed_at": null,
8
- "resource_id": 12,
9
- "resource_type": "floating_ip",
10
- "region_slug": "nyc1",
11
- "region": {
12
- "name": "New York",
13
- "slug": "nyc1",
14
- "available": true,
15
- "sizes": [
16
- "512mb"
17
- ],
18
- "features": [
19
- "virtio",
20
- "private_networking",
21
- "backups",
22
- "ipv6",
23
- "metadata"
24
- ]
25
- }
26
- }
27
- }
@@ -1,186 +0,0 @@
1
- {
2
- "floating_ips": [
3
- {
4
- "ip": "45.55.96.32",
5
- "region": {
6
- "available": true,
7
- "features": [
8
- "private_networking",
9
- "backups",
10
- "ipv6",
11
- "metadata"
12
- ],
13
- "sizes": [
14
- "512mb",
15
- "1gb",
16
- "2gb",
17
- "4gb",
18
- "8gb",
19
- "16gb",
20
- "32gb",
21
- "48gb",
22
- "64gb"
23
- ],
24
- "slug": "nyc3",
25
- "name": "New York 3"
26
- },
27
- "droplet": {
28
- "region": {
29
- "available": true,
30
- "features": [
31
- "private_networking",
32
- "backups",
33
- "ipv6",
34
- "metadata"
35
- ],
36
- "sizes": [
37
- "512mb",
38
- "1gb",
39
- "2gb",
40
- "4gb",
41
- "8gb",
42
- "16gb",
43
- "32gb",
44
- "48gb",
45
- "64gb"
46
- ],
47
- "slug": "nyc3",
48
- "name": "New York 3"
49
- },
50
- "networks": {
51
- "v6": [],
52
- "v4": [
53
- {
54
- "type": "public",
55
- "gateway": "104.131.0.1",
56
- "netmask": "255.255.192.0",
57
- "ip_address": "104.131.39.129"
58
- }
59
- ]
60
- },
61
- "kernel": {
62
- "version": "3.13.0-57-generic",
63
- "name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-57-generic",
64
- "id": 5175
65
- },
66
- "status": "active",
67
- "locked": false,
68
- "disk": 20,
69
- "vcpus": 1,
70
- "memory": 512,
71
- "name": "nyc3",
72
- "id": 7173070,
73
- "created_at": "2015-09-08T20:29:48Z",
74
- "features": [
75
- "virtio"
76
- ],
77
- "backup_ids": [],
78
- "next_backup_window": null,
79
- "snapshot_ids": [],
80
- "image": {
81
- "type": "snapshot",
82
- "id": 13089493,
83
- "name": "14.04 x64",
84
- "distribution": "Ubuntu",
85
- "slug": "ubuntu-14-04-x64",
86
- "public": true,
87
- "regions": [
88
- "nyc1",
89
- "ams1",
90
- "sfo1",
91
- "nyc2",
92
- "ams2",
93
- "sgp1",
94
- "lon1",
95
- "nyc3",
96
- "ams3",
97
- "fra1",
98
- "tor1"
99
- ],
100
- "created_at": "2015-08-10T21:30:19Z",
101
- "min_disk_size": 20
102
- },
103
- "size": {
104
- "available": true,
105
- "slug": "512mb",
106
- "memory": 512,
107
- "vcpus": 1,
108
- "disk": 20,
109
- "transfer": 1,
110
- "price_monthly": 5,
111
- "price_hourly": 0.00744,
112
- "regions": [
113
- "nyc1",
114
- "sgp1",
115
- "ams1",
116
- "sfo1",
117
- "nyc2",
118
- "lon1",
119
- "nyc3",
120
- "ams3",
121
- "ams2",
122
- "fra1",
123
- "tor1"
124
- ]
125
- },
126
- "size_slug": "512mb"
127
- }
128
- },
129
- {
130
- "ip": "188.166.132.3",
131
- "region": {
132
- "available": true,
133
- "features": [
134
- "private_networking",
135
- "backups",
136
- "ipv6",
137
- "metadata"
138
- ],
139
- "sizes": [
140
- "512mb",
141
- "1gb",
142
- "2gb",
143
- "4gb",
144
- "8gb",
145
- "16gb",
146
- "32gb",
147
- "48gb",
148
- "64gb"
149
- ],
150
- "slug": "ams3",
151
- "name": "Amsterdam 3"
152
- },
153
- "droplet": null
154
- },
155
- {
156
- "ip": "45.55.96.3",
157
- "region": {
158
- "available": true,
159
- "features": [
160
- "private_networking",
161
- "backups",
162
- "ipv6",
163
- "metadata"
164
- ],
165
- "sizes": [
166
- "512mb",
167
- "1gb",
168
- "2gb",
169
- "4gb",
170
- "8gb",
171
- "16gb",
172
- "32gb",
173
- "48gb",
174
- "64gb"
175
- ],
176
- "slug": "nyc3",
177
- "name": "New York 3"
178
- },
179
- "droplet": null
180
- }
181
- ],
182
- "meta": {
183
- "total": 3
184
- },
185
- "links": {}
186
- }