fog-brightbox 0.16.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -6
- data/CHANGELOG.md +40 -0
- data/README.md +3 -4
- data/fog-brightbox.gemspec +4 -3
- data/lib/fog/brightbox.rb +4 -24
- data/lib/fog/brightbox/compute.rb +18 -33
- data/lib/fog/brightbox/compute/config.rb +1 -1
- data/lib/fog/brightbox/compute/image_selector.rb +5 -3
- data/lib/fog/brightbox/compute/resource_locking.rb +1 -1
- data/lib/fog/brightbox/compute/shared.rb +3 -3
- data/lib/fog/brightbox/models/compute/account.rb +2 -2
- data/lib/fog/brightbox/models/compute/accounts.rb +3 -3
- data/lib/fog/brightbox/models/compute/api_client.rb +3 -3
- data/lib/fog/brightbox/models/compute/api_clients.rb +3 -3
- data/lib/fog/brightbox/models/compute/application.rb +2 -2
- data/lib/fog/brightbox/models/compute/applications.rb +3 -3
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +3 -3
- data/lib/fog/brightbox/models/compute/cloud_ips.rb +3 -3
- data/lib/fog/brightbox/models/compute/collaboration.rb +3 -3
- data/lib/fog/brightbox/models/compute/collaborations.rb +5 -5
- data/lib/fog/brightbox/models/compute/database_server.rb +6 -3
- data/lib/fog/brightbox/models/compute/database_servers.rb +3 -3
- data/lib/fog/brightbox/models/compute/database_snapshot.rb +3 -3
- data/lib/fog/brightbox/models/compute/database_snapshots.rb +3 -3
- data/lib/fog/brightbox/models/compute/database_type.rb +2 -2
- data/lib/fog/brightbox/models/compute/database_types.rb +3 -3
- data/lib/fog/brightbox/models/compute/event.rb +2 -2
- data/lib/fog/brightbox/models/compute/events.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_policies.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +3 -3
- data/lib/fog/brightbox/models/compute/firewall_rules.rb +3 -3
- data/lib/fog/brightbox/models/compute/flavor.rb +2 -2
- data/lib/fog/brightbox/models/compute/flavors.rb +3 -3
- data/lib/fog/brightbox/models/compute/image.rb +3 -3
- data/lib/fog/brightbox/models/compute/images.rb +3 -3
- data/lib/fog/brightbox/models/compute/load_balancer.rb +3 -3
- data/lib/fog/brightbox/models/compute/load_balancers.rb +3 -3
- data/lib/fog/brightbox/models/compute/server.rb +3 -3
- data/lib/fog/brightbox/models/compute/server_group.rb +3 -3
- data/lib/fog/brightbox/models/compute/server_groups.rb +3 -3
- data/lib/fog/brightbox/models/compute/servers.rb +4 -4
- data/lib/fog/brightbox/models/compute/user.rb +2 -2
- data/lib/fog/brightbox/models/compute/user_collaboration.rb +3 -3
- data/lib/fog/brightbox/models/compute/user_collaborations.rb +4 -4
- data/lib/fog/brightbox/models/compute/users.rb +3 -3
- data/lib/fog/brightbox/models/compute/zone.rb +2 -2
- data/lib/fog/brightbox/models/compute/zones.rb +3 -3
- data/lib/fog/brightbox/models/storage/directories.rb +4 -4
- data/lib/fog/brightbox/models/storage/directory.rb +3 -3
- data/lib/fog/brightbox/models/storage/file.rb +2 -2
- data/lib/fog/brightbox/models/storage/files.rb +6 -6
- data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +2 -2
- data/lib/fog/brightbox/requests/compute/activate_console_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +2 -2
- data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_api_client.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_application.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_collaboration.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_image.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/create_server_group.rb +2 -2
- data/lib/fog/brightbox/requests/compute/delete_api_client.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_application.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_cloud_ip.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_database_server.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_firewall_policy.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_firewall_rule.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_image.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_load_balancer.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_server.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_server_group.rb +2 -10
- data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +2 -10
- data/lib/fog/brightbox/requests/compute/get_account.rb +6 -15
- data/lib/fog/brightbox/requests/compute/get_api_client.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_application.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_collaboration.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_database_type.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_image.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_interface.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_server_group.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_server_type.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_user.rb +6 -15
- data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_zone.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_api_clients.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_applications.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_collaborations.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_database_servers.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_database_types.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_events.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_images.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_server_groups.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_server_types.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_servers.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_users.rb +2 -2
- data/lib/fog/brightbox/requests/compute/list_zones.rb +2 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_database_snapshot.rb +2 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_image.rb +2 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +2 -2
- data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reboot_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +2 -2
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +2 -2
- data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +2 -2
- data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +6 -15
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +2 -2
- data/lib/fog/brightbox/requests/compute/reset_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/shutdown_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/start_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/stop_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_database_snapshot.rb +2 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_image.rb +2 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_account.rb +15 -36
- data/lib/fog/brightbox/requests/compute/update_api_client.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_application.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_database_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_image.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_server.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_server_group.rb +2 -2
- data/lib/fog/brightbox/requests/compute/update_user.rb +2 -2
- data/lib/fog/brightbox/requests/storage/copy_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/delete_container.rb +3 -3
- data/lib/fog/brightbox/requests/storage/delete_multiple_objects.rb +2 -2
- data/lib/fog/brightbox/requests/storage/delete_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/delete_static_large_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/get_container.rb +3 -3
- data/lib/fog/brightbox/requests/storage/get_containers.rb +2 -2
- data/lib/fog/brightbox/requests/storage/get_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/get_object_http_url.rb +2 -2
- data/lib/fog/brightbox/requests/storage/get_object_https_url.rb +2 -2
- data/lib/fog/brightbox/requests/storage/head_container.rb +3 -3
- data/lib/fog/brightbox/requests/storage/head_containers.rb +2 -2
- data/lib/fog/brightbox/requests/storage/head_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/post_set_meta_temp_url_key.rb +2 -2
- data/lib/fog/brightbox/requests/storage/put_container.rb +3 -3
- data/lib/fog/brightbox/requests/storage/put_dynamic_obj_manifest.rb +5 -5
- data/lib/fog/brightbox/requests/storage/put_object.rb +3 -3
- data/lib/fog/brightbox/requests/storage/put_object_manifest.rb +2 -2
- data/lib/fog/brightbox/requests/storage/put_static_obj_manifest.rb +4 -4
- data/lib/fog/brightbox/storage.rb +12 -5
- data/lib/fog/brightbox/storage/authentication_request.rb +1 -1
- data/lib/fog/brightbox/storage/authentication_required.rb +1 -1
- data/lib/fog/brightbox/storage/config.rb +1 -1
- data/lib/fog/brightbox/storage/connection.rb +2 -2
- data/lib/fog/brightbox/storage/management_url_unknown.rb +1 -1
- data/lib/fog/brightbox/storage/not_found.rb +8 -0
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/brightbox/compute/wrapped_request_spec.rb +4 -4
- data/spec/fog/brightbox/config_spec.rb +3 -3
- data/spec/fog/brightbox/link_helper_spec.rb +1 -1
- data/spec/fog/brightbox/storage/authentication_request_spec.rb +4 -4
- data/spec/fog/brightbox/storage/connection_errors_spec.rb +1 -1
- data/spec/fog/brightbox/storage/connection_spec.rb +2 -2
- data/spec/fog/compute/brightbox/account_spec.rb +1 -1
- data/spec/fog/compute/brightbox/api_client_spec.rb +1 -1
- data/spec/fog/compute/brightbox/application_spec.rb +1 -1
- data/spec/fog/compute/brightbox/cloud_ip_spec.rb +1 -1
- data/spec/fog/compute/brightbox/collaboration_spec.rb +1 -1
- data/spec/fog/compute/brightbox/database_server_spec.rb +20 -9
- data/spec/fog/compute/brightbox/database_snapshot_spec.rb +1 -1
- data/spec/fog/compute/brightbox/database_type_spec.rb +1 -1
- data/spec/fog/compute/brightbox/event_spec.rb +1 -1
- data/spec/fog/compute/brightbox/firewall_policy_spec.rb +1 -1
- data/spec/fog/compute/brightbox/flavor_spec.rb +1 -1
- data/spec/fog/compute/brightbox/image_spec.rb +1 -1
- data/spec/fog/compute/brightbox/load_balancer_spec.rb +1 -1
- data/spec/fog/compute/brightbox/server_group_spec.rb +1 -1
- data/spec/fog/compute/brightbox/server_spec.rb +4 -8
- data/spec/fog/compute/brightbox/user_collaboration_spec.rb +1 -1
- data/spec/fog/compute/brightbox/user_spec.rb +1 -1
- data/spec/fog/compute/brightbox/zone_spec.rb +1 -1
- data/spec/fog/compute/brightbox_spec.rb +5 -5
- data/spec/fog/storage/brightbox_spec.rb +8 -10
- data/spec/model_setup.rb +1 -1
- data/spec/supports_resource_locking.rb +0 -4
- data/tests/brightbox/compute/schema.rb +1 -1
- data/tests/brightbox/compute_tests.rb +2 -2
- data/tests/brightbox/requests/compute/api_client_tests.rb +2 -2
- data/tests/brightbox/requests/compute/application_test.rb +2 -2
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +2 -2
- data/tests/brightbox/requests/compute/collaboration_tests.rb +6 -3
- data/tests/brightbox/requests/compute/database_server_tests.rb +2 -2
- data/tests/brightbox/requests/compute/database_snapsnot_tests.rb +2 -2
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +2 -2
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +2 -2
- data/tests/brightbox/requests/compute/helper.rb +1 -1
- data/tests/brightbox/requests/compute/image_tests.rb +2 -2
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +2 -2
- data/tests/brightbox/requests/compute/server_group_tests.rb +2 -2
- data/tests/brightbox/requests/compute/server_tests.rb +2 -2
- metadata +14 -23
- data/gemfiles/Gemfile.1.9.3 +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfa9b2e98e5691a853fa9b6e68f37de41f10ac081d04402d4be4c5842b1ba930
|
4
|
+
data.tar.gz: d95737e730099ba23713c5f4c2c196c2e7aab63387c7febe1e3d2608a84174b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43a52dc0cb5a4444eafd03d9ad6414bc3a08ab826d97e658a505229d4c7a32b2267ced2206e7d7e9f19cbc0dc02576d172fce9eb1f786c69d75f8808e0134ad8
|
7
|
+
data.tar.gz: fbb69efe2d339176ba36bab0ba55da159e45a525adeeb0d742819e52617a3d0f61b9e5c6b7d2e0fc2a275fc56eac15ae026cad6f4fa8446145a6c510f19b5183
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,43 @@
|
|
1
|
+
### 1.1.0 / 2020-06-30
|
2
|
+
|
3
|
+
Changes:
|
4
|
+
|
5
|
+
* Add Ruby 2.6 and 2.7 to Travis CI testing matrix.
|
6
|
+
* Remove bundler installation step from Travis CI.
|
7
|
+
* Use `example.test` for testing domains rather than `example.com` to avoid
|
8
|
+
leaking routable traffic.
|
9
|
+
* Add `FOG_TEST_COLLABORATOR_EMAIL` to enable ENV based setting of email
|
10
|
+
address when using the tests for integation tests.`
|
11
|
+
|
12
|
+
Bug fixes:
|
13
|
+
|
14
|
+
* Add `status` check to `ImageSelector` so that unavailable images were not
|
15
|
+
selected for use automatically and causing failures in tests.
|
16
|
+
* Fix creating database servers from snapshots by adding the `snapshot_id`
|
17
|
+
attribute ensuring the value is not filtered when using the model.
|
18
|
+
|
19
|
+
### 1.0.0 / 2018-10-05
|
20
|
+
|
21
|
+
Major Changes:
|
22
|
+
|
23
|
+
* Gem version has been changed 1.0 to reflect breaking changes.
|
24
|
+
* Ruby versions 1.9 is longer supported as per fog-core v2.
|
25
|
+
* Ruby versions 2.0 and 2.1 are no longer supported by Brightbox although a
|
26
|
+
hard value has not been used in the gemspec to avoid issues with `fog`
|
27
|
+
* Remove deprecated versions of `#(get|update)_account` and `#get_user` which
|
28
|
+
did not require identifiers and were treated as the authenticated user.
|
29
|
+
* Remove deprecated `Compute#request` multiple argument version.
|
30
|
+
* Remove deprecated `#destroy_(resource)` requests.
|
31
|
+
* Fix `#destroy_(resource)` references in models.
|
32
|
+
|
33
|
+
### 0.16.1 / 2018-09-07
|
34
|
+
|
35
|
+
Bug fixes:
|
36
|
+
|
37
|
+
* Fix ordering issue between declaration of fog services and `autoload` modules.
|
38
|
+
Changes in `fog-core` would reference modules before available in autoload so
|
39
|
+
caused a name error.
|
40
|
+
|
1
41
|
### 0.16.0 / 2018-09-04
|
2
42
|
|
3
43
|
Changes:
|
data/README.md
CHANGED
@@ -39,11 +39,10 @@ and its modules:
|
|
39
39
|
* http://fog.io/
|
40
40
|
* http://rubydoc.info/gems/fog/
|
41
41
|
|
42
|
-
### Ruby
|
42
|
+
### Ruby version support
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
specify in your application's `Gemfile`
|
44
|
+
As required by the main `fog-core` library, support for Ruby 1.9 was dropped in
|
45
|
+
`v1.0.0` of this gem.
|
47
46
|
|
48
47
|
## Contributing
|
49
48
|
|
data/fog-brightbox.gemspec
CHANGED
@@ -14,15 +14,16 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/fog/fog-brightbox"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
-
spec.files = `git ls-files`.split(
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.
|
22
|
+
spec.required_ruby_version = "~> 2.0"
|
23
|
+
|
24
|
+
spec.add_dependency "fog-core", ">= 1.45", "< 3.0"
|
23
25
|
spec.add_dependency "fog-json"
|
24
26
|
spec.add_dependency "dry-inflector"
|
25
|
-
spec.add_dependency "mime-types"
|
26
27
|
|
27
28
|
spec.add_development_dependency "bundler"
|
28
29
|
spec.add_development_dependency "minitest"
|
data/lib/fog/brightbox.rb
CHANGED
@@ -11,36 +11,16 @@ module Fog
|
|
11
11
|
module Brightbox
|
12
12
|
extend Fog::Provider
|
13
13
|
|
14
|
-
|
15
|
-
|
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
|
-
|
40
|
-
|
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
|
3
|
-
class
|
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
|
-
# @
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
# @
|
223
|
-
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
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
|
-
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
2
|
module Brightbox
|
3
|
-
|
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
|
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
|
@@ -28,6 +28,7 @@ module Fog
|
|
28
28
|
def latest_ubuntu
|
29
29
|
@images.select do |img|
|
30
30
|
img["official"] == true &&
|
31
|
+
img["status"] == "available" &&
|
31
32
|
img["arch"] == "i686" &&
|
32
33
|
img["name"] =~ /ubuntu/i
|
33
34
|
end.sort do |a, b|
|
@@ -46,7 +47,8 @@ module Fog
|
|
46
47
|
def official_minimal
|
47
48
|
@images.select do |img|
|
48
49
|
img["official"] == true &&
|
49
|
-
|
50
|
+
img["status"] == "available" &&
|
51
|
+
img["virtual_size"] != 0
|
50
52
|
end.sort_by do |img|
|
51
53
|
img["disk_size"]
|
52
54
|
end.first["id"]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fog
|
2
2
|
module Brightbox
|
3
|
-
|
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::
|
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::
|
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,10 +1,10 @@
|
|
1
1
|
require "fog/brightbox/models/compute/account"
|
2
2
|
|
3
3
|
module Fog
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module Brightbox
|
5
|
+
class Compute
|
6
6
|
class Accounts < Fog::Collection
|
7
|
-
model Fog::Compute::
|
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
|
3
|
-
class
|
2
|
+
module Brightbox
|
3
|
+
class Compute
|
4
4
|
class ApiClient < Fog::Brightbox::Model
|
5
5
|
identity :id
|
6
6
|
attribute :name
|
@@ -24,7 +24,7 @@ module Fog
|
|
24
24
|
|
25
25
|
def destroy
|
26
26
|
requires :identity
|
27
|
-
service.
|
27
|
+
service.delete_api_client(identity)
|
28
28
|
true
|
29
29
|
end
|
30
30
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "fog/brightbox/models/compute/api_client"
|
2
2
|
|
3
3
|
module Fog
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module Brightbox
|
5
|
+
class Compute
|
6
6
|
class ApiClients < Fog::Collection
|
7
|
-
model Fog::Compute::
|
7
|
+
model Fog::Brightbox::Compute::ApiClient
|
8
8
|
|
9
9
|
def all
|
10
10
|
data = service.list_api_clients
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "fog/brightbox/models/compute/application"
|
2
2
|
|
3
3
|
module Fog
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module Brightbox
|
5
|
+
class Compute
|
6
6
|
class Applications < Fog::Collection
|
7
|
-
model Fog::Compute::
|
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
|
3
|
-
class
|
2
|
+
module Brightbox
|
3
|
+
class Compute
|
4
4
|
class CloudIp < Fog::Brightbox::Model
|
5
5
|
identity :id
|
6
6
|
attribute :url
|
@@ -53,7 +53,7 @@ module Fog
|
|
53
53
|
|
54
54
|
def destroy
|
55
55
|
requires :identity
|
56
|
-
service.
|
56
|
+
service.delete_cloud_ip(identity)
|
57
57
|
end
|
58
58
|
|
59
59
|
def destination_id
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "fog/brightbox/models/compute/cloud_ip"
|
2
2
|
|
3
3
|
module Fog
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module Brightbox
|
5
|
+
class Compute
|
6
6
|
class CloudIps < Fog::Collection
|
7
|
-
model Fog::Compute::
|
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
|
3
|
-
class
|
2
|
+
module Brightbox
|
3
|
+
class Compute
|
4
4
|
class Collaboration < Fog::Brightbox::Model
|
5
5
|
identity :id
|
6
6
|
attribute :status
|
@@ -37,7 +37,7 @@ module Fog
|
|
37
37
|
|
38
38
|
def destroy
|
39
39
|
requires :identity
|
40
|
-
data = service.
|
40
|
+
data = service.delete_collaboration(identity)
|
41
41
|
merge_attributes(data)
|
42
42
|
true
|
43
43
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "fog/brightbox/models/compute/collaboration"
|
2
2
|
|
3
3
|
module Fog
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module Brightbox
|
5
|
+
class Compute
|
6
6
|
class Collaborations < Fog::Collection
|
7
|
-
model Fog::Compute::
|
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::
|
28
|
+
# @return [Fog::Brightbox::Compute::Collaboration]
|
29
29
|
#
|
30
30
|
def invite(email, role)
|
31
31
|
return nil if email.nil? || email == ""
|
@@ -37,7 +37,7 @@ module Fog
|
|
37
37
|
|
38
38
|
def destroy
|
39
39
|
requires :identity
|
40
|
-
service.
|
40
|
+
service.delete_collaboration(identity)
|
41
41
|
true
|
42
42
|
end
|
43
43
|
end
|