fog-brightbox 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -1
- data/CHANGELOG.md +12 -0
- data/gemfiles/Gemfile.1.8.7 +1 -0
- data/gemfiles/Gemfile.1.9.3 +5 -0
- data/lib/fog/brightbox/compute.rb +5 -1
- data/lib/fog/brightbox/models/compute/accounts.rb +2 -2
- data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/activate_console_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +1 -0
- data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +1 -0
- data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +1 -0
- data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_api_client.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_application.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_collaboration.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_database_server.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_image.rb +2 -1
- data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +3 -1
- data/lib/fog/brightbox/requests/compute/create_server.rb +1 -0
- data/lib/fog/brightbox/requests/compute/create_server_group.rb +1 -0
- data/lib/fog/brightbox/requests/compute/delete_api_client.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_application.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_cloud_ip.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_database_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_firewall_policy.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_firewall_rule.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_image.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_load_balancer.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_server_group.rb +4 -2
- data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_account.rb +5 -3
- data/lib/fog/brightbox/requests/compute/get_api_client.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_application.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_database_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_database_type.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_image.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_interface.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -2
- data/lib/fog/brightbox/requests/compute/get_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_server_group.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_server_type.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_user.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/get_zone.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +5 -2
- data/lib/fog/brightbox/requests/compute/list_api_clients.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_applications.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_collaborations.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_database_servers.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_database_types.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_events.rb +1 -0
- data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_images.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_server_groups.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_server_types.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_servers.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_users.rb +4 -2
- data/lib/fog/brightbox/requests/compute/list_zones.rb +4 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_database_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_database_snapshot.rb +4 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_image.rb +4 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_load_balancer.rb +4 -2
- data/lib/fog/brightbox/requests/compute/lock_resource_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +1 -0
- data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +1 -0
- data/lib/fog/brightbox/requests/compute/reboot_server.rb +5 -3
- data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +1 -0
- data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +1 -0
- data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +1 -0
- data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +1 -0
- data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +4 -2
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +5 -3
- data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +4 -2
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +4 -2
- data/lib/fog/brightbox/requests/compute/reset_server.rb +5 -3
- data/lib/fog/brightbox/requests/compute/shutdown_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +1 -0
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +1 -0
- data/lib/fog/brightbox/requests/compute/start_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/stop_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_database_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_database_snapshot.rb +4 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_image.rb +4 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_load_balancer.rb +4 -2
- data/lib/fog/brightbox/requests/compute/unlock_resource_server.rb +4 -2
- data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +4 -2
- data/lib/fog/brightbox/requests/compute/update_account.rb +2 -0
- data/lib/fog/brightbox/requests/compute/update_api_client.rb +2 -0
- data/lib/fog/brightbox/requests/compute/update_application.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_database_server.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_image.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +3 -1
- data/lib/fog/brightbox/requests/compute/update_server.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_server_group.rb +1 -0
- data/lib/fog/brightbox/requests/compute/update_user.rb +1 -0
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/compute/brightbox/database_server_spec.rb +6 -4
- data/spec/fog/compute/brightbox/server_spec.rb +6 -4
- data/spec/supports_resource_locking.rb +6 -2
- data/tests/brightbox/requests/compute/account_tests.rb +1 -1
- metadata +159 -135
- checksums.yaml +0 -7
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#server_lock_resource_server
|
10
12
|
#
|
11
|
-
def lock_resource_server(identifier)
|
13
|
+
def lock_resource_server(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("put", "/1.0/servers/#{identifier}/lock_resource", [200])
|
15
|
+
wrapped_request("put", "/1.0/servers/#{identifier}/lock_resource", [200], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -7,6 +7,7 @@ module Fog
|
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
8
|
# @param [Hash] options
|
9
9
|
# @option options [String] :destination The ID of an Interface or LoadBalancer to map the Cloud IP against
|
10
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
10
11
|
#
|
11
12
|
# @return [Hash] if successful Hash version of JSON object
|
12
13
|
# @return [NilClass] if no options were passed
|
@@ -9,6 +9,7 @@ module Fog
|
|
9
9
|
# @option options [Array<Hash>] :servers Array of Hashes containing
|
10
10
|
# +{"server" => server_id}+ for each server to remove
|
11
11
|
# @option options [String] :destination ServerGroup to move servers to
|
12
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
12
13
|
#
|
13
14
|
# @return [Hash] if successful Hash version of JSON object
|
14
15
|
# @return [NilClass] if no options were passed
|
@@ -2,17 +2,19 @@ module Fog
|
|
2
2
|
module Compute
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
|
-
#
|
5
|
+
# Issues a 'soft' reboot to the server however the OS may ignore it. The console remains connected.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#server_reboot_server
|
12
14
|
#
|
13
|
-
def reboot_server(identifier)
|
15
|
+
def reboot_server(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/servers/#{identifier}/reboot", [202])
|
17
|
+
wrapped_request("post", "/1.0/servers/#{identifier}/reboot", [202], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Rejects the collaboration
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#user_collaboration_reject_user_collaboration
|
12
14
|
#
|
13
|
-
def reject_user_collaboration(identifier)
|
15
|
+
def reject_user_collaboration(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/user/collaborations/#{identifier}/reject", [200])
|
17
|
+
wrapped_request("post", "/1.0/user/collaborations/#{identifier}/reject", [200], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -7,6 +7,7 @@ module Fog
|
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
8
|
# @param [Hash] options
|
9
9
|
# @option options [String] :server_group Server Group to remove
|
10
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
10
11
|
#
|
11
12
|
# @return [Hash] if successful Hash version of JSON object
|
12
13
|
# @return [NilClass] if no options were passed
|
@@ -7,6 +7,7 @@ module Fog
|
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
8
|
# @param [Hash] options
|
9
9
|
# @option options [Array] :listeners Array of Listener parameters
|
10
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
10
11
|
#
|
11
12
|
# @return [Hash] if successful Hash version of JSON object
|
12
13
|
# @return [NilClass] if no options were passed
|
@@ -7,6 +7,7 @@ module Fog
|
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
8
|
# @param [Hash] options
|
9
9
|
# @option options [Array] :nodes Array of Node parameters
|
10
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
10
11
|
#
|
11
12
|
# @return [Hash] if successful Hash version of JSON object
|
12
13
|
# @return [NilClass] if no options were passed
|
@@ -8,6 +8,7 @@ module Fog
|
|
8
8
|
# @param [Hash] options
|
9
9
|
# @option options [Array<Hash>] :servers Array of Hashes containing
|
10
10
|
# +{"server" => server_id}+ for each server
|
11
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
11
12
|
#
|
12
13
|
# @return [Hash] if successful Hash version of JSON object
|
13
14
|
# @return [NilClass] if no options were passed
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Resends the invitation email to the collaborator
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#collaboration_resend_collaboration
|
12
14
|
#
|
13
|
-
def resend_collaboration(identifier)
|
15
|
+
def resend_collaboration(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/collaborations/#{identifier}/resend", [200])
|
17
|
+
wrapped_request("post", "/1.0/collaborations/#{identifier}/resend", [200], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -6,8 +6,10 @@ module Fog
|
|
6
6
|
#
|
7
7
|
# @note The response is the only time the new password is available in plaintext.
|
8
8
|
#
|
9
|
-
# @overload reset_ftp_password_account(identifier)
|
9
|
+
# @overload reset_ftp_password_account(identifier, options = {})
|
10
10
|
# @param [String] identifier Unique reference to identify the resource
|
11
|
+
# @param [Hash] options
|
12
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
11
13
|
#
|
12
14
|
# @overload reset_ftp_password_account()
|
13
15
|
# @deprecated Use {Fog::Compute::Brightbox::Real#reset_ftp_password_scoped_account} instead
|
@@ -16,12 +18,12 @@ module Fog
|
|
16
18
|
#
|
17
19
|
# @see https://api.gb1.brightbox.com/1.0/#account_reset_ftp_password_account
|
18
20
|
#
|
19
|
-
def reset_ftp_password_account(identifier = nil)
|
21
|
+
def reset_ftp_password_account(identifier = nil, options = {})
|
20
22
|
if identifier.nil? || identifier.empty?
|
21
23
|
Fog::Logger.deprecation("reset_ftp_password_account() without a parameter is deprecated, use reset_ftp_password_scoped_account instead [light_black](#{caller.first})[/]")
|
22
24
|
reset_ftp_password_scoped_account
|
23
25
|
else
|
24
|
-
wrapped_request("post", "/1.0/accounts/#{identifier}/reset_ftp_password", [200])
|
26
|
+
wrapped_request("post", "/1.0/accounts/#{identifier}/reset_ftp_password", [200], options)
|
25
27
|
end
|
26
28
|
end
|
27
29
|
end
|
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#database_server_reset_password_database_server
|
10
12
|
#
|
11
|
-
def reset_password_database_server(identifier)
|
13
|
+
def reset_password_database_server(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("post", "/1.0/database_servers/#{identifier}/reset_password", [202])
|
15
|
+
wrapped_request("post", "/1.0/database_servers/#{identifier}/reset_password", [202], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -9,14 +9,16 @@ module Fog
|
|
9
9
|
# Already authenticated tokens will still continue to be valid until expiry.
|
10
10
|
#
|
11
11
|
# @param [String] identifier Unique reference to identify the resource
|
12
|
+
# @param [Hash] options
|
13
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
12
14
|
#
|
13
15
|
# @return [Hash] if successful Hash version of JSON object
|
14
16
|
#
|
15
17
|
# @see https://api.gb1.brightbox.com/1.0/#api_client_reset_secret_api_client
|
16
18
|
#
|
17
|
-
def reset_secret_api_client(identifier)
|
19
|
+
def reset_secret_api_client(identifier, options = {})
|
18
20
|
return nil if identifier.nil? || identifier == ""
|
19
|
-
wrapped_request("post", "/1.0/api_clients/#{identifier}/reset_secret", [200])
|
21
|
+
wrapped_request("post", "/1.0/api_clients/#{identifier}/reset_secret", [200], options)
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Resets the secret used by the application to a new generated value.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#application_reset_secret_application
|
12
14
|
#
|
13
|
-
def reset_secret_application(identifier)
|
15
|
+
def reset_secret_application(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/applications/#{identifier}/reset_secret", [200])
|
17
|
+
wrapped_request("post", "/1.0/applications/#{identifier}/reset_secret", [200], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -2,17 +2,19 @@ module Fog
|
|
2
2
|
module Compute
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
|
-
#
|
5
|
+
# Issues a 'hard' reboot request to the server which can not be ignored by the OS. The console remains connected.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#server_reset_server
|
12
14
|
#
|
13
|
-
def reset_server(identifier)
|
15
|
+
def reset_server(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/servers/#{identifier}/reset", [202])
|
17
|
+
wrapped_request("post", "/1.0/servers/#{identifier}/reset", [202], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Will issue a safe shutdown request for the server.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#server_shutdown_server
|
12
14
|
#
|
13
|
-
def shutdown_server(identifier)
|
15
|
+
def shutdown_server(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/servers/#{identifier}/shutdown", [202])
|
17
|
+
wrapped_request("post", "/1.0/servers/#{identifier}/shutdown", [202], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -5,6 +5,7 @@ module Fog
|
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
6
|
# @param [Hash] options
|
7
7
|
# @option options [Boolean] :return_link Return the Link header as a second return value
|
8
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
9
|
#
|
9
10
|
# @return [Hash] if successful Hash version of JSON object
|
10
11
|
#
|
@@ -7,6 +7,7 @@ module Fog
|
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
8
|
# @param [Hash] options
|
9
9
|
# @option options [Boolean] :return_link Return the Link header as a second return value
|
10
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
10
11
|
#
|
11
12
|
# @return [Hash] if successful Hash version of JSON object
|
12
13
|
#
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Will issue a start request for the server to become active.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#server_start_server
|
12
14
|
#
|
13
|
-
def start_server(identifier)
|
15
|
+
def start_server(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/servers/#{identifier}/start", [202])
|
17
|
+
wrapped_request("post", "/1.0/servers/#{identifier}/start", [202], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Will issue a stop request for the server to become inactive.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#server_stop_server
|
12
14
|
#
|
13
|
-
def stop_server(identifier)
|
15
|
+
def stop_server(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/servers/#{identifier}/stop", [202])
|
17
|
+
wrapped_request("post", "/1.0/servers/#{identifier}/stop", [202], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#database_server_unlock_resource_database_server
|
10
12
|
#
|
11
|
-
def unlock_resource_database_server(identifier)
|
13
|
+
def unlock_resource_database_server(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("put", "/1.0/database_servers/#{identifier}/unlock_resource", [200])
|
15
|
+
wrapped_request("put", "/1.0/database_servers/#{identifier}/unlock_resource", [200], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#database_snapshot_unlock_resource_database_snapshot
|
10
12
|
#
|
11
|
-
def unlock_resource_database_snapshot(identifier)
|
13
|
+
def unlock_resource_database_snapshot(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("put", "/1.0/database_snapshots/#{identifier}/unlock_resource", [200])
|
15
|
+
wrapped_request("put", "/1.0/database_snapshots/#{identifier}/unlock_resource", [200], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#image_unlock_resource_image
|
10
12
|
#
|
11
|
-
def unlock_resource_image(identifier)
|
13
|
+
def unlock_resource_image(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("put", "/1.0/images/#{identifier}/unlock_resource", [200])
|
15
|
+
wrapped_request("put", "/1.0/images/#{identifier}/unlock_resource", [200], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#load_balancer_unlock_resource_load_balancer
|
10
12
|
#
|
11
|
-
def unlock_resource_load_balancer(identifier)
|
13
|
+
def unlock_resource_load_balancer(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("put", "/1.0/load_balancers/#{identifier}/unlock_resource", [200])
|
15
|
+
wrapped_request("put", "/1.0/load_balancers/#{identifier}/unlock_resource", [200], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -3,14 +3,16 @@ module Fog
|
|
3
3
|
class Brightbox
|
4
4
|
class Real
|
5
5
|
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
6
8
|
#
|
7
9
|
# @return [Hash] if successful Hash version of JSON object
|
8
10
|
#
|
9
11
|
# @see https://api.gb1.brightbox.com/1.0/#server_unlock_resource_server
|
10
12
|
#
|
11
|
-
def unlock_resource_server(identifier)
|
13
|
+
def unlock_resource_server(identifier, options = {})
|
12
14
|
return nil if identifier.nil? || identifier == ""
|
13
|
-
wrapped_request("put", "/1.0/servers/#{identifier}/unlock_resource", [200])
|
15
|
+
wrapped_request("put", "/1.0/servers/#{identifier}/unlock_resource", [200], options)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -5,14 +5,16 @@ module Fog
|
|
5
5
|
# Unmaps a cloud IP address from its current destination making it available to remap. This remains in the account's pool of addresses.
|
6
6
|
#
|
7
7
|
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
|
8
10
|
#
|
9
11
|
# @return [Hash] if successful Hash version of JSON object
|
10
12
|
#
|
11
13
|
# @see https://api.gb1.brightbox.com/1.0/#cloud_ip_unmap_cloud_ip
|
12
14
|
#
|
13
|
-
def unmap_cloud_ip(identifier)
|
15
|
+
def unmap_cloud_ip(identifier, options = {})
|
14
16
|
return nil if identifier.nil? || identifier == ""
|
15
|
-
wrapped_request("post", "/1.0/cloud_ips/#{identifier}/unmap", [202])
|
17
|
+
wrapped_request("post", "/1.0/cloud_ips/#{identifier}/unmap", [202], options)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|