fog-brightbox 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -1
  3. data/fog-brightbox.gemspec +2 -2
  4. data/lib/fog/brightbox.rb +4 -24
  5. data/lib/fog/brightbox/compute.rb +18 -33
  6. data/lib/fog/brightbox/compute/config.rb +1 -1
  7. data/lib/fog/brightbox/compute/image_selector.rb +2 -2
  8. data/lib/fog/brightbox/compute/resource_locking.rb +1 -1
  9. data/lib/fog/brightbox/compute/shared.rb +3 -3
  10. data/lib/fog/brightbox/models/compute/account.rb +2 -2
  11. data/lib/fog/brightbox/models/compute/accounts.rb +3 -3
  12. data/lib/fog/brightbox/models/compute/api_client.rb +2 -2
  13. data/lib/fog/brightbox/models/compute/api_clients.rb +3 -3
  14. data/lib/fog/brightbox/models/compute/application.rb +2 -2
  15. data/lib/fog/brightbox/models/compute/applications.rb +3 -3
  16. data/lib/fog/brightbox/models/compute/cloud_ip.rb +2 -2
  17. data/lib/fog/brightbox/models/compute/cloud_ips.rb +3 -3
  18. data/lib/fog/brightbox/models/compute/collaboration.rb +2 -2
  19. data/lib/fog/brightbox/models/compute/collaborations.rb +4 -4
  20. data/lib/fog/brightbox/models/compute/database_server.rb +2 -2
  21. data/lib/fog/brightbox/models/compute/database_servers.rb +3 -3
  22. data/lib/fog/brightbox/models/compute/database_snapshot.rb +2 -2
  23. data/lib/fog/brightbox/models/compute/database_snapshots.rb +3 -3
  24. data/lib/fog/brightbox/models/compute/database_type.rb +2 -2
  25. data/lib/fog/brightbox/models/compute/database_types.rb +3 -3
  26. data/lib/fog/brightbox/models/compute/event.rb +2 -2
  27. data/lib/fog/brightbox/models/compute/events.rb +3 -3
  28. data/lib/fog/brightbox/models/compute/firewall_policies.rb +3 -3
  29. data/lib/fog/brightbox/models/compute/firewall_policy.rb +2 -2
  30. data/lib/fog/brightbox/models/compute/firewall_rule.rb +2 -2
  31. data/lib/fog/brightbox/models/compute/firewall_rules.rb +3 -3
  32. data/lib/fog/brightbox/models/compute/flavor.rb +2 -2
  33. data/lib/fog/brightbox/models/compute/flavors.rb +3 -3
  34. data/lib/fog/brightbox/models/compute/image.rb +2 -2
  35. data/lib/fog/brightbox/models/compute/images.rb +3 -3
  36. data/lib/fog/brightbox/models/compute/load_balancer.rb +2 -2
  37. data/lib/fog/brightbox/models/compute/load_balancers.rb +3 -3
  38. data/lib/fog/brightbox/models/compute/server.rb +2 -2
  39. data/lib/fog/brightbox/models/compute/server_group.rb +2 -2
  40. data/lib/fog/brightbox/models/compute/server_groups.rb +3 -3
  41. data/lib/fog/brightbox/models/compute/servers.rb +4 -4
  42. data/lib/fog/brightbox/models/compute/user.rb +2 -2
  43. data/lib/fog/brightbox/models/compute/user_collaboration.rb +2 -2
  44. data/lib/fog/brightbox/models/compute/user_collaborations.rb +3 -3
  45. data/lib/fog/brightbox/models/compute/users.rb +3 -3
  46. data/lib/fog/brightbox/models/compute/zone.rb +2 -2
  47. data/lib/fog/brightbox/models/compute/zones.rb +3 -3
  48. data/lib/fog/brightbox/models/storage/directories.rb +4 -4
  49. data/lib/fog/brightbox/models/storage/directory.rb +3 -3
  50. data/lib/fog/brightbox/models/storage/file.rb +2 -2
  51. data/lib/fog/brightbox/models/storage/files.rb +6 -6
  52. data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +2 -2
  53. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +2 -2
  54. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +2 -2
  55. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +2 -2
  56. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +2 -2
  57. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +2 -2
  58. data/lib/fog/brightbox/requests/compute/create_api_client.rb +2 -2
  59. data/lib/fog/brightbox/requests/compute/create_application.rb +2 -2
  60. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +2 -2
  61. data/lib/fog/brightbox/requests/compute/create_collaboration.rb +2 -2
  62. data/lib/fog/brightbox/requests/compute/create_database_server.rb +2 -2
  63. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +2 -2
  64. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +2 -2
  65. data/lib/fog/brightbox/requests/compute/create_image.rb +2 -2
  66. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +2 -2
  67. data/lib/fog/brightbox/requests/compute/create_server.rb +2 -2
  68. data/lib/fog/brightbox/requests/compute/create_server_group.rb +2 -2
  69. data/lib/fog/brightbox/requests/compute/delete_api_client.rb +2 -10
  70. data/lib/fog/brightbox/requests/compute/delete_application.rb +2 -10
  71. data/lib/fog/brightbox/requests/compute/delete_cloud_ip.rb +2 -10
  72. data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +2 -10
  73. data/lib/fog/brightbox/requests/compute/delete_database_server.rb +2 -10
  74. data/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +2 -10
  75. data/lib/fog/brightbox/requests/compute/delete_firewall_policy.rb +2 -10
  76. data/lib/fog/brightbox/requests/compute/delete_firewall_rule.rb +2 -10
  77. data/lib/fog/brightbox/requests/compute/delete_image.rb +2 -10
  78. data/lib/fog/brightbox/requests/compute/delete_load_balancer.rb +2 -10
  79. data/lib/fog/brightbox/requests/compute/delete_server.rb +2 -10
  80. data/lib/fog/brightbox/requests/compute/delete_server_group.rb +2 -10
  81. data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +2 -10
  82. data/lib/fog/brightbox/requests/compute/get_account.rb +6 -15
  83. data/lib/fog/brightbox/requests/compute/get_api_client.rb +2 -2
  84. data/lib/fog/brightbox/requests/compute/get_application.rb +2 -2
  85. data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -2
  86. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +2 -2
  87. data/lib/fog/brightbox/requests/compute/get_collaboration.rb +2 -2
  88. data/lib/fog/brightbox/requests/compute/get_database_server.rb +2 -2
  89. data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +2 -2
  90. data/lib/fog/brightbox/requests/compute/get_database_type.rb +2 -2
  91. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +2 -2
  92. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +2 -2
  93. data/lib/fog/brightbox/requests/compute/get_image.rb +2 -2
  94. data/lib/fog/brightbox/requests/compute/get_interface.rb +2 -2
  95. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +2 -2
  96. data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -2
  97. data/lib/fog/brightbox/requests/compute/get_server.rb +2 -2
  98. data/lib/fog/brightbox/requests/compute/get_server_group.rb +2 -2
  99. data/lib/fog/brightbox/requests/compute/get_server_type.rb +2 -2
  100. data/lib/fog/brightbox/requests/compute/get_user.rb +6 -15
  101. data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +2 -2
  102. data/lib/fog/brightbox/requests/compute/get_zone.rb +2 -2
  103. data/lib/fog/brightbox/requests/compute/list_accounts.rb +2 -2
  104. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +2 -2
  105. data/lib/fog/brightbox/requests/compute/list_applications.rb +2 -2
  106. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +2 -2
  107. data/lib/fog/brightbox/requests/compute/list_collaborations.rb +2 -2
  108. data/lib/fog/brightbox/requests/compute/list_database_servers.rb +2 -2
  109. data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +2 -2
  110. data/lib/fog/brightbox/requests/compute/list_database_types.rb +2 -2
  111. data/lib/fog/brightbox/requests/compute/list_events.rb +2 -2
  112. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +2 -2
  113. data/lib/fog/brightbox/requests/compute/list_images.rb +2 -2
  114. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +2 -2
  115. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +2 -2
  116. data/lib/fog/brightbox/requests/compute/list_server_types.rb +2 -2
  117. data/lib/fog/brightbox/requests/compute/list_servers.rb +2 -2
  118. data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +2 -2
  119. data/lib/fog/brightbox/requests/compute/list_users.rb +2 -2
  120. data/lib/fog/brightbox/requests/compute/list_zones.rb +2 -2
  121. data/lib/fog/brightbox/requests/compute/lock_resource_database_server.rb +2 -2
  122. data/lib/fog/brightbox/requests/compute/lock_resource_database_snapshot.rb +2 -2
  123. data/lib/fog/brightbox/requests/compute/lock_resource_image.rb +2 -2
  124. data/lib/fog/brightbox/requests/compute/lock_resource_load_balancer.rb +2 -2
  125. data/lib/fog/brightbox/requests/compute/lock_resource_server.rb +2 -2
  126. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +2 -2
  127. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +2 -2
  128. data/lib/fog/brightbox/requests/compute/reboot_server.rb +2 -2
  129. data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +2 -2
  130. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +2 -2
  131. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +2 -2
  132. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +2 -2
  133. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +2 -2
  134. data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +2 -2
  135. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +6 -15
  136. data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +2 -2
  137. data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +2 -2
  138. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +2 -2
  139. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +2 -2
  140. data/lib/fog/brightbox/requests/compute/reset_server.rb +2 -2
  141. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +2 -2
  142. data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +2 -2
  143. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +2 -2
  144. data/lib/fog/brightbox/requests/compute/start_server.rb +2 -2
  145. data/lib/fog/brightbox/requests/compute/stop_server.rb +2 -2
  146. data/lib/fog/brightbox/requests/compute/unlock_resource_database_server.rb +2 -2
  147. data/lib/fog/brightbox/requests/compute/unlock_resource_database_snapshot.rb +2 -2
  148. data/lib/fog/brightbox/requests/compute/unlock_resource_image.rb +2 -2
  149. data/lib/fog/brightbox/requests/compute/unlock_resource_load_balancer.rb +2 -2
  150. data/lib/fog/brightbox/requests/compute/unlock_resource_server.rb +2 -2
  151. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +2 -2
  152. data/lib/fog/brightbox/requests/compute/update_account.rb +15 -36
  153. data/lib/fog/brightbox/requests/compute/update_api_client.rb +2 -2
  154. data/lib/fog/brightbox/requests/compute/update_application.rb +2 -2
  155. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +2 -2
  156. data/lib/fog/brightbox/requests/compute/update_database_server.rb +2 -2
  157. data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +2 -2
  158. data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +2 -2
  159. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +2 -2
  160. data/lib/fog/brightbox/requests/compute/update_image.rb +2 -2
  161. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +2 -2
  162. data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +2 -2
  163. data/lib/fog/brightbox/requests/compute/update_server.rb +2 -2
  164. data/lib/fog/brightbox/requests/compute/update_server_group.rb +2 -2
  165. data/lib/fog/brightbox/requests/compute/update_user.rb +2 -2
  166. data/lib/fog/brightbox/requests/storage/copy_object.rb +3 -3
  167. data/lib/fog/brightbox/requests/storage/delete_container.rb +3 -3
  168. data/lib/fog/brightbox/requests/storage/delete_multiple_objects.rb +2 -2
  169. data/lib/fog/brightbox/requests/storage/delete_object.rb +3 -3
  170. data/lib/fog/brightbox/requests/storage/delete_static_large_object.rb +3 -3
  171. data/lib/fog/brightbox/requests/storage/get_container.rb +3 -3
  172. data/lib/fog/brightbox/requests/storage/get_containers.rb +2 -2
  173. data/lib/fog/brightbox/requests/storage/get_object.rb +3 -3
  174. data/lib/fog/brightbox/requests/storage/get_object_http_url.rb +2 -2
  175. data/lib/fog/brightbox/requests/storage/get_object_https_url.rb +2 -2
  176. data/lib/fog/brightbox/requests/storage/head_container.rb +3 -3
  177. data/lib/fog/brightbox/requests/storage/head_containers.rb +2 -2
  178. data/lib/fog/brightbox/requests/storage/head_object.rb +3 -3
  179. data/lib/fog/brightbox/requests/storage/post_set_meta_temp_url_key.rb +2 -2
  180. data/lib/fog/brightbox/requests/storage/put_container.rb +3 -3
  181. data/lib/fog/brightbox/requests/storage/put_dynamic_obj_manifest.rb +5 -5
  182. data/lib/fog/brightbox/requests/storage/put_object.rb +3 -3
  183. data/lib/fog/brightbox/requests/storage/put_object_manifest.rb +2 -2
  184. data/lib/fog/brightbox/requests/storage/put_static_obj_manifest.rb +4 -4
  185. data/lib/fog/brightbox/storage.rb +12 -5
  186. data/lib/fog/brightbox/storage/authentication_request.rb +1 -1
  187. data/lib/fog/brightbox/storage/authentication_required.rb +1 -1
  188. data/lib/fog/brightbox/storage/config.rb +1 -1
  189. data/lib/fog/brightbox/storage/connection.rb +2 -2
  190. data/lib/fog/brightbox/storage/management_url_unknown.rb +1 -1
  191. data/lib/fog/brightbox/storage/not_found.rb +8 -0
  192. data/lib/fog/brightbox/version.rb +1 -1
  193. data/spec/fog/brightbox/compute/wrapped_request_spec.rb +4 -4
  194. data/spec/fog/brightbox/storage/connection_errors_spec.rb +1 -1
  195. data/spec/fog/brightbox/storage/connection_spec.rb +2 -2
  196. data/spec/fog/compute/brightbox/account_spec.rb +1 -1
  197. data/spec/fog/compute/brightbox/api_client_spec.rb +1 -1
  198. data/spec/fog/compute/brightbox/application_spec.rb +1 -1
  199. data/spec/fog/compute/brightbox/cloud_ip_spec.rb +1 -1
  200. data/spec/fog/compute/brightbox/collaboration_spec.rb +1 -1
  201. data/spec/fog/compute/brightbox/database_server_spec.rb +4 -4
  202. data/spec/fog/compute/brightbox/database_snapshot_spec.rb +1 -1
  203. data/spec/fog/compute/brightbox/database_type_spec.rb +1 -1
  204. data/spec/fog/compute/brightbox/event_spec.rb +1 -1
  205. data/spec/fog/compute/brightbox/firewall_policy_spec.rb +1 -1
  206. data/spec/fog/compute/brightbox/flavor_spec.rb +1 -1
  207. data/spec/fog/compute/brightbox/image_spec.rb +1 -1
  208. data/spec/fog/compute/brightbox/load_balancer_spec.rb +1 -1
  209. data/spec/fog/compute/brightbox/server_group_spec.rb +1 -1
  210. data/spec/fog/compute/brightbox/server_spec.rb +4 -4
  211. data/spec/fog/compute/brightbox/user_collaboration_spec.rb +1 -1
  212. data/spec/fog/compute/brightbox/user_spec.rb +1 -1
  213. data/spec/fog/compute/brightbox/zone_spec.rb +1 -1
  214. data/spec/fog/compute/brightbox_spec.rb +5 -5
  215. data/spec/fog/storage/brightbox_spec.rb +4 -4
  216. data/spec/model_setup.rb +1 -1
  217. data/tests/brightbox/compute/schema.rb +1 -1
  218. data/tests/brightbox/requests/compute/helper.rb +1 -1
  219. metadata +16 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 260e64a984c3827dc0d65a611880ad0d6ff2dd6f013c32200587f75d77cb3b71
4
- data.tar.gz: 0c633c0ced7435cae179b33e2821b01fc65b3afe9a18a26555922dc348ea1bca
3
+ metadata.gz: 596dfd578ca96a4cee58e9c7f08ee7b12138418928e1d87aad063f60338c6021
4
+ data.tar.gz: 91cb8da6872fdb3f58d77d21dee833cbbd2498cac588cb63fd6960e2201d2150
5
5
  SHA512:
6
- metadata.gz: 793f1cc0d487e8b9d99de98bfda048f7e2812e87e9fd6b6a22cffbf104e771ad7ca6b75992a5438c3e020afee961ba8b9dcdd19e2d8d1bc96bdadf1fff220d98
7
- data.tar.gz: e62ee84f1c381a83177482f70ac2867bcbaa4862c11c6a0d885cfef02f0da10afcf0ee651d6d4cadab5e0b8c790ea384b42704db1c1a74b5b1d3f7f687d166a1
6
+ metadata.gz: 89373d00211b08167c72f1784a86b5c739047e09da4a5b5e529a916fadefe94e567ad4eba5f2da4cbf48e5456420f18345281253feb54ab7899d5717c1e842d3
7
+ data.tar.gz: 6b8fc01d4b0cbb91a69cdab24cdc2d0b4cf3a7a38f24fa458ece9951cdcc840f08625484babd9ee65687e378a7dab86172971bff7a3ffa9ba2f6242e343da3f1
data/CHANGELOG.md CHANGED
@@ -6,7 +6,22 @@ Major Changes:
6
6
  * Ruby versions 1.9 is longer supported as per fog-core v2.
7
7
  * Ruby versions 2.0 and 2.1 are no longer supported by Brightbox although a
8
8
  hard value has not been used in the gemspec to avoid issues with `fog`
9
- * `inflecto` is replaced by `dry-inflector`
9
+ * Remove deprecated versions of `#(get|update)_account` and `#get_user` which
10
+ did not require identifiers and were treated as the authenticated user.
11
+ * Remove deprecated `Compute#request` multiple argument version.
12
+ * Remove deprecated `#destroy_(resource)` requests.
13
+
14
+ ### 0.16.0 / 2018-09-04
15
+
16
+ Changes:
17
+
18
+ * Replaced abandoned `inflecto` dependency with `dry-inflector` gem.
19
+
20
+ ### 0.15.1 / 2018-06-22
21
+
22
+ Bug fixes:
23
+
24
+ * Remove pessimistic dependency versions.
10
25
 
11
26
  ### 0.15.0 / 2018-06-14
12
27
 
@@ -21,11 +21,11 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.required_ruby_version = "~> 2.0"
23
23
 
24
- spec.add_dependency "fog-core", "~> 2.0"
24
+ spec.add_dependency "fog-core", ">= 1.45", "< 3.0"
25
25
  spec.add_dependency "fog-json"
26
26
  spec.add_dependency "dry-inflector"
27
27
 
28
- spec.add_development_dependency "bundler", "~> 1.3"
28
+ spec.add_development_dependency "bundler"
29
29
  spec.add_development_dependency "minitest"
30
30
  spec.add_development_dependency "pry"
31
31
  spec.add_development_dependency "rake"
data/lib/fog/brightbox.rb CHANGED
@@ -11,36 +11,16 @@ module Fog
11
11
  module Brightbox
12
12
  extend Fog::Provider
13
13
 
14
- service(:compute, "Compute")
15
- service(:storage, "Storage")
16
-
17
- module Compute
18
- autoload :Config, File.expand_path("../brightbox/compute/config", __FILE__)
19
- autoload :ImageSelector, File.expand_path("../brightbox/compute/image_selector", __FILE__)
20
- autoload :ResourceLocking, File.expand_path("../brightbox/compute/resource_locking", __FILE__)
21
- autoload :Shared, File.expand_path("../brightbox/compute/shared", __FILE__)
22
- end
23
-
24
- module Storage
25
- autoload :AuthenticationRequest, File.expand_path("../brightbox/storage/authentication_request", __FILE__)
26
- autoload :AuthenticationRequired, File.expand_path("../brightbox/storage/authentication_required", __FILE__)
27
- autoload :Connection, File.expand_path("../brightbox/storage/connection", __FILE__)
28
- autoload :Config, File.expand_path("../brightbox/storage/config", __FILE__)
29
- autoload :ManagementUrlUnknown, File.expand_path("../brightbox/storage/management_url_unknown", __FILE__)
30
- end
14
+ autoload :Compute, File.expand_path("../brightbox/compute", __FILE__)
15
+ autoload :Storage, File.expand_path("../brightbox/storage", __FILE__)
31
16
 
32
17
  autoload :Config, File.expand_path("../brightbox/config", __FILE__)
33
18
  autoload :LinkHelper, File.expand_path("../brightbox/link_helper", __FILE__)
34
19
  autoload :Model, File.expand_path("../brightbox/model", __FILE__)
35
20
  autoload :ModelHelper, File.expand_path("../brightbox/model_helper", __FILE__)
36
21
  autoload :OAuth2, File.expand_path("../brightbox/oauth2", __FILE__)
37
- end
38
22
 
39
- module Compute
40
- autoload :Brightbox, File.expand_path("../brightbox/compute", __FILE__)
41
- end
42
-
43
- module Storage
44
- autoload :Brightbox, File.expand_path("../brightbox/storage", __FILE__)
23
+ service(:compute, "Compute")
24
+ service(:storage, "Storage")
45
25
  end
46
26
  end
@@ -1,6 +1,11 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox < Fog::Service
2
+ module Brightbox
3
+ class Compute < Fog::Service
4
+ autoload :Config, File.expand_path("../compute/config", __FILE__)
5
+ autoload :ImageSelector, File.expand_path("../compute/image_selector", __FILE__)
6
+ autoload :ResourceLocking, File.expand_path("../compute/resource_locking", __FILE__)
7
+ autoload :Shared, File.expand_path("../compute/shared", __FILE__)
8
+
4
9
  # Client credentials
5
10
  requires :brightbox_client_id, :brightbox_secret
6
11
 
@@ -214,39 +219,19 @@ module Fog
214
219
  # Makes an API request to the given path using passed options or those
215
220
  # set with the service setup
216
221
  #
217
- # @todo Standard Fog behaviour is to return the Excon::Response but
218
- # this was unintentionally changed to be the Hash version of the
219
- # data in the body. This loses access to some details and should
220
- # be corrected in a backwards compatible manner
221
- #
222
- # @overload request(params)
223
- # @param [Hash] params Excon compatible options
224
- # @option params [String] :body text to be sent over a socket
225
- # @option params [Hash<Symbol, String>] :headers The default headers to supply in a request
226
- # @option params [String] :host The destination host's reachable DNS name or IP, in the form of a String
227
- # @option params [String] :path appears after 'scheme://host:port/'
228
- # @option params [Fixnum] :port The port on which to connect, to the destination host
229
- # @option params [Hash] :query appended to the 'scheme://host:port/path/' in the form of '?key=value'
230
- # @option params [String] :scheme The protocol; 'https' causes OpenSSL to be used
231
- # @return [Excon::Response]
232
- # @see https://github.com/geemus/excon/blob/master/lib/excon/connection.rb
222
+ # @param [Hash] params Excon compatible options
223
+ # @option params [String] :body text to be sent over a socket
224
+ # @option params [Hash<Symbol, String>] :headers The default headers to supply in a request
225
+ # @option params [String] :host The destination host's reachable DNS name or IP, in the form of a String
226
+ # @option params [String] :path appears after 'scheme://host:port/'
227
+ # @option params [Fixnum] :port The port on which to connect, to the destination host
228
+ # @option params [Hash] :query appended to the 'scheme://host:port/path/' in the form of '?key=value'
229
+ # @option params [String] :scheme The protocol; 'https' causes OpenSSL to be used
230
+ # @return [Excon::Response]
231
+ # @see https://github.com/geemus/excon/blob/master/lib/excon/connection.rb
233
232
  #
234
- # @overload request(method, path, expected_responses, params = {})
235
- # @param [String] method HTTP method to use for the request
236
- # @param [String] path The absolute path for the request
237
- # @param [Array<Fixnum>] expected_responses HTTP response codes that have been successful
238
- # @param [Hash] params Keys and values for JSON
239
- # @option params [String] :account_id The scoping account if required
240
- # @deprecated #request with multiple arguments is deprecated
241
- # since it is inconsistent with original fog version.
242
- # @return [Hash]
243
233
  def request(*args)
244
- if args.size == 1
245
- authenticated_request(*args)
246
- else
247
- Fog::Logger.deprecation("#request with multiple parameters is deprecated, use #wrapped_request instead [light_black](#{caller.first})[/]")
248
- wrapped_request(*args)
249
- end
234
+ authenticated_request(*args)
250
235
  end
251
236
 
252
237
  # Makes a request but with seperated arguments and parses the response to a hash
@@ -2,7 +2,7 @@ require "delegate"
2
2
 
3
3
  module Fog
4
4
  module Brightbox
5
- module Compute
5
+ class Compute
6
6
  class Config < SimpleDelegator
7
7
  def initialize(config)
8
8
  super
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Brightbox
3
- module Compute
3
+ class Compute
4
4
  #
5
5
  # This selects the preferred image to use based on a number of
6
6
  # conditions
@@ -8,7 +8,7 @@ module Fog
8
8
  class ImageSelector
9
9
  # Prepares a selector with the API output
10
10
  #
11
- # @param [Array<Hash>] images hash matching API output for {Fog::Compute::Brightbox#list_images}
11
+ # @param [Array<Hash>] images hash matching API output for {Fog::Brightbox::Compute#list_images}
12
12
  #
13
13
  def initialize(images)
14
14
  @images = images
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Brightbox
3
- module Compute
3
+ class Compute
4
4
  module ResourceLocking
5
5
  def locked?
6
6
  if attributes.key?("locked") || attributes.key?(:locked)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Brightbox
3
- module Compute
3
+ class Compute
4
4
  # The Shared module consists of code that was duplicated between the Real
5
5
  # and Mock implementations.
6
6
  #
@@ -79,11 +79,11 @@ module Fog
79
79
  # * For User applications this is the account specified by either +account_id+
80
80
  # option on the service or the +brightbox_account+ setting in your configuration
81
81
  #
82
- # @return [Fog::Compute::Brightbox::Account]
82
+ # @return [Fog::Brightbox::Compute::Account]
83
83
  #
84
84
  def account
85
85
  account_data = get_scoped_account.merge(:service => self)
86
- Fog::Compute::Brightbox::Account.new(account_data)
86
+ Fog::Brightbox::Compute::Account.new(account_data)
87
87
  end
88
88
 
89
89
  # Returns true if authentication is being performed as a user
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class Account < Fog::Brightbox::Model
5
5
  identity :id
6
6
  attribute :url
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/account"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class Accounts < Fog::Collection
7
- model Fog::Compute::Brightbox::Account
7
+ model Fog::Brightbox::Compute::Account
8
8
 
9
9
  def all(options = {})
10
10
  data = service.list_accounts(options)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class ApiClient < Fog::Brightbox::Model
5
5
  identity :id
6
6
  attribute :name
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/api_client"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class ApiClients < Fog::Collection
7
- model Fog::Compute::Brightbox::ApiClient
7
+ model Fog::Brightbox::Compute::ApiClient
8
8
 
9
9
  def all
10
10
  data = service.list_api_clients
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class Application < Fog::Brightbox::Model
5
5
  identity :id
6
6
  attribute :url
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/application"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class Applications < Fog::Collection
7
- model Fog::Compute::Brightbox::Application
7
+ model Fog::Brightbox::Compute::Application
8
8
 
9
9
  def all
10
10
  data = service.list_applications
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class CloudIp < Fog::Brightbox::Model
5
5
  identity :id
6
6
  attribute :url
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/cloud_ip"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class CloudIps < Fog::Collection
7
- model Fog::Compute::Brightbox::CloudIp
7
+ model Fog::Brightbox::Compute::CloudIp
8
8
 
9
9
  def all
10
10
  data = service.list_cloud_ips
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class Collaboration < Fog::Brightbox::Model
5
5
  identity :id
6
6
  attribute :status
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/collaboration"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class Collaborations < Fog::Collection
7
- model Fog::Compute::Brightbox::Collaboration
7
+ model Fog::Brightbox::Compute::Collaboration
8
8
 
9
9
  def all
10
10
  data = service.list_collaborations
@@ -25,7 +25,7 @@ module Fog
25
25
  # @param [String] email The email address to use for the invitation
26
26
  # @param [String] role The role being granted. Only (+admin+ is
27
27
  # currently supported
28
- # @return [Fog::Compute::Brightbox::Collaboration]
28
+ # @return [Fog::Brightbox::Compute::Collaboration]
29
29
  #
30
30
  def invite(email, role)
31
31
  return nil if email.nil? || email == ""
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class DatabaseServer < Fog::Brightbox::Model
5
5
  include Fog::Brightbox::Compute::ResourceLocking
6
6
 
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/database_server"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class DatabaseServers < Fog::Collection
7
- model Fog::Compute::Brightbox::DatabaseServer
7
+ model Fog::Brightbox::Compute::DatabaseServer
8
8
 
9
9
  def all
10
10
  data = service.list_database_servers
@@ -1,8 +1,8 @@
1
1
  require "fog/brightbox/compute/resource_locking"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class DatabaseSnapshot < Fog::Brightbox::Model
7
7
  include Fog::Brightbox::Compute::ResourceLocking
8
8
 
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/database_snapshot"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class DatabaseSnapshots < Fog::Collection
7
- model Fog::Compute::Brightbox::DatabaseSnapshot
7
+ model Fog::Brightbox::Compute::DatabaseSnapshot
8
8
 
9
9
  def all
10
10
  data = service.list_database_snapshots
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  class DatabaseType < Fog::Brightbox::Model
5
5
  identity :id
6
6
  attribute :url
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/database_type"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class DatabaseTypes < Fog::Collection
7
- model Fog::Compute::Brightbox::DatabaseType
7
+ model Fog::Brightbox::Compute::DatabaseType
8
8
 
9
9
  def all
10
10
  data = service.list_database_types
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Brightbox
2
+ module Brightbox
3
+ class Compute
4
4
  # @api private
5
5
  class Event < Fog::Brightbox::Model
6
6
  identity :id
@@ -1,10 +1,10 @@
1
1
  require "fog/brightbox/models/compute/event"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Brightbox
4
+ module Brightbox
5
+ class Compute
6
6
  class Events < Fog::Collection
7
- model Fog::Compute::Brightbox::Event
7
+ model Fog::Brightbox::Compute::Event
8
8
 
9
9
  def all
10
10
  data = service.list_events