Class: Fog::Compute::Brightbox::Real
- Inherits:
-
Object
- Object
- Fog::Compute::Brightbox::Real
- Includes:
- Brightbox::Compute::Shared
- Defined in:
- lib/fog/brightbox/compute.rb,
lib/fog/brightbox/requests/compute/get_user.rb,
lib/fog/brightbox/requests/compute/get_zone.rb,
lib/fog/brightbox/requests/compute/get_image.rb,
lib/fog/brightbox/requests/compute/get_server.rb,
lib/fog/brightbox/requests/compute/list_users.rb,
lib/fog/brightbox/requests/compute/list_zones.rb,
lib/fog/brightbox/requests/compute/get_account.rb,
lib/fog/brightbox/requests/compute/list_images.rb,
lib/fog/brightbox/requests/compute/stop_server.rb,
lib/fog/brightbox/requests/compute/update_user.rb,
lib/fog/brightbox/requests/compute/create_image.rb,
lib/fog/brightbox/requests/compute/delete_image.rb,
lib/fog/brightbox/requests/compute/get_cloud_ip.rb,
lib/fog/brightbox/requests/compute/list_servers.rb,
lib/fog/brightbox/requests/compute/map_cloud_ip.rb,
lib/fog/brightbox/requests/compute/start_server.rb,
lib/fog/brightbox/requests/compute/update_image.rb,
lib/fog/brightbox/requests/compute/create_server.rb,
lib/fog/brightbox/requests/compute/delete_server.rb,
lib/fog/brightbox/requests/compute/get_interface.rb,
lib/fog/brightbox/requests/compute/list_accounts.rb,
lib/fog/brightbox/requests/compute/update_server.rb,
lib/fog/brightbox/requests/compute/get_api_client.rb,
lib/fog/brightbox/requests/compute/list_cloud_ips.rb,
lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb,
lib/fog/brightbox/requests/compute/update_account.rb,
lib/fog/brightbox/requests/compute/create_cloud_ip.rb,
lib/fog/brightbox/requests/compute/delete_cloud_ip.rb,
lib/fog/brightbox/requests/compute/get_application.rb,
lib/fog/brightbox/requests/compute/get_server_type.rb,
lib/fog/brightbox/requests/compute/shutdown_server.rb,
lib/fog/brightbox/requests/compute/snapshot_server.rb,
lib/fog/brightbox/requests/compute/update_cloud_ip.rb,
lib/fog/brightbox/requests/compute/get_server_group.rb,
lib/fog/brightbox/requests/compute/list_api_clients.rb,
lib/fog/brightbox/requests/compute/create_api_client.rb,
lib/fog/brightbox/requests/compute/delete_api_client.rb,
lib/fog/brightbox/requests/compute/get_collaboration.rb,
lib/fog/brightbox/requests/compute/get_database_type.rb,
lib/fog/brightbox/requests/compute/get_firewall_rule.rb,
lib/fog/brightbox/requests/compute/get_load_balancer.rb,
lib/fog/brightbox/requests/compute/list_applications.rb,
lib/fog/brightbox/requests/compute/list_server_types.rb,
lib/fog/brightbox/requests/compute/update_api_client.rb,
lib/fog/brightbox/requests/compute/create_application.rb,
lib/fog/brightbox/requests/compute/delete_application.rb,
lib/fog/brightbox/requests/compute/get_scoped_account.rb,
lib/fog/brightbox/requests/compute/list_server_groups.rb,
lib/fog/brightbox/requests/compute/update_application.rb,
lib/fog/brightbox/requests/compute/create_server_group.rb,
lib/fog/brightbox/requests/compute/delete_server_group.rb,
lib/fog/brightbox/requests/compute/get_database_server.rb,
lib/fog/brightbox/requests/compute/get_firewall_policy.rb,
lib/fog/brightbox/requests/compute/list_collaborations.rb,
lib/fog/brightbox/requests/compute/list_database_types.rb,
lib/fog/brightbox/requests/compute/list_load_balancers.rb,
lib/fog/brightbox/requests/compute/update_server_group.rb,
lib/fog/brightbox/requests/compute/create_collaboration.rb,
lib/fog/brightbox/requests/compute/create_firewall_rule.rb,
lib/fog/brightbox/requests/compute/create_load_balancer.rb,
lib/fog/brightbox/requests/compute/delete_collaboration.rb,
lib/fog/brightbox/requests/compute/delete_firewall_rule.rb,
lib/fog/brightbox/requests/compute/delete_load_balancer.rb,
lib/fog/brightbox/requests/compute/resend_collaboration.rb,
lib/fog/brightbox/requests/compute/update_firewall_rule.rb,
lib/fog/brightbox/requests/compute/update_load_balancer.rb,
lib/fog/brightbox/requests/compute/get_database_snapshot.rb,
lib/fog/brightbox/requests/compute/list_database_servers.rb,
lib/fog/brightbox/requests/compute/update_scoped_account.rb,
lib/fog/brightbox/requests/compute/create_database_server.rb,
lib/fog/brightbox/requests/compute/create_firewall_policy.rb,
lib/fog/brightbox/requests/compute/delete_database_server.rb,
lib/fog/brightbox/requests/compute/delete_firewall_policy.rb,
lib/fog/brightbox/requests/compute/get_authenticated_user.rb,
lib/fog/brightbox/requests/compute/get_user_collaboration.rb,
lib/fog/brightbox/requests/compute/list_firewall_policies.rb,
lib/fog/brightbox/requests/compute/remove_firewall_policy.rb,
lib/fog/brightbox/requests/compute/update_database_server.rb,
lib/fog/brightbox/requests/compute/update_firewall_policy.rb,
lib/fog/brightbox/requests/compute/activate_console_server.rb,
lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb,
lib/fog/brightbox/requests/compute/list_database_snapshots.rb,
lib/fog/brightbox/requests/compute/reset_secret_api_client.rb,
lib/fog/brightbox/requests/compute/add_servers_server_group.rb,
lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb,
lib/fog/brightbox/requests/compute/delete_database_snapshot.rb,
lib/fog/brightbox/requests/compute/list_user_collaborations.rb,
lib/fog/brightbox/requests/compute/reset_secret_application.rb,
lib/fog/brightbox/requests/compute/snapshot_database_server.rb,
lib/fog/brightbox/requests/compute/update_database_snapshot.rb,
lib/fog/brightbox/requests/compute/accept_user_collaboration.rb,
lib/fog/brightbox/requests/compute/delete_user_collaboration.rb,
lib/fog/brightbox/requests/compute/move_servers_server_group.rb,
lib/fog/brightbox/requests/compute/reject_user_collaboration.rb,
lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb,
lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb,
lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb,
lib/fog/brightbox/requests/compute/remove_servers_server_group.rb,
lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb,
lib/fog/brightbox/requests/compute/reset_password_database_server.rb,
lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb
Overview
The Real Service actually makes real connections to the Brightbox service.
Constant Summary
Constants included from Brightbox::Compute::Shared
Brightbox::Compute::Shared::API_URL
Instance Method Summary collapse
-
#accept_user_collaboration(identifier) ⇒ Hash
Accepts the collaboration and gaining permitted access.
-
#activate_console_server(identifier) ⇒ Hash
Enable console access via VNC to the server for 15 minutes.
-
#add_listeners_load_balancer(identifier, options) ⇒ Hash, NilClass
Adds a number of listeners to the load balancer to enable balancing across nodes for those settings.
-
#add_nodes_load_balancer(identifier, options) ⇒ Hash, NilClass
Add a number of nodes to the load balancer.
-
#add_servers_server_group(identifier, options) ⇒ Hash, NilClass
Add a number of servers to the server group.
-
#apply_to_firewall_policy(identifier, options) ⇒ Hash, NilClass
Applies firewall policy to given server group.
-
#create_api_client(options) ⇒ Hash, NilClass
Create a new API client for the account.
-
#create_application(options) ⇒ Hash, NilClass
Create a new application for the user.
-
#create_cloud_ip(options = {}) ⇒ Hash, NilClass
Requests a new cloud IP address for the account.
-
#create_collaboration(options) ⇒ Hash, NilClass
Creates a new collaboration for a user for the account.
- #create_database_server(options) ⇒ Hash, NilClass
-
#create_firewall_policy(options) ⇒ Hash, NilClass
Create a new firewall policy for the account.
-
#create_firewall_rule(options) ⇒ Hash, NilClass
Create a new firewall rule for a firewall policy.
-
#create_image(options) ⇒ Hash, NilClass
Create a new image for the account by registering it against an image stored within the Brightbox cloud image library.
-
#create_load_balancer(options) ⇒ Hash, NilClass
Create a new load balancer for the account.
-
#create_server(options) ⇒ Hash, NilClass
Create a new server for the account based on the required disk image.
-
#create_server_group(options) ⇒ Hash, NilClass
Create a new server group for the account.
-
#delete_api_client(identifier) ⇒ Hash
Destroy the API client.
-
#delete_application(identifier) ⇒ Hash
Destroy the application.
-
#delete_cloud_ip(identifier) ⇒ Hash
Release the cloud IP address from the account’s ownership.
-
#delete_collaboration(identifier) ⇒ Hash
Cancels or completes the collaboration.
-
#delete_database_server(identifier) ⇒ Hash
If successful Hash version of JSON object.
-
#delete_database_snapshot(identifier) ⇒ Hash
If successful Hash version of JSON object.
-
#delete_firewall_policy(identifier) ⇒ Hash
Destroy the firewall policy if not in use.
-
#delete_firewall_rule(identifier) ⇒ Hash
Destroy the firewall rule.
-
#delete_image(identifier) ⇒ Hash
Destroy the image.
-
#delete_load_balancer(identifier) ⇒ Hash
Destroy the LoadBalancer.
-
#delete_server(identifier) ⇒ Hash
Destroy the server and free up the resources.
-
#delete_server_group(identifier) ⇒ Hash
Destroy the server group if not in use.
-
#delete_user_collaboration(identifier) ⇒ Hash
Ends an existing ‘accepted’ collaboration.
-
#destroy_api_client(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_api_client
instead -
#destroy_application(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_application
instead -
#destroy_cloud_ip(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_cloud_ip
instead -
#destroy_collaboration(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_collaboration
instead -
#destroy_database_server(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_database_server
instead -
#destroy_database_snapshot(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_database_snapshot
instead -
#destroy_firewall_policy(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_firewall_policy
instead -
#destroy_firewall_rule(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_firewall_rule
instead -
#destroy_image(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_image
instead -
#destroy_load_balancer(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_load_balancer
instead -
#destroy_server(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_server
instead -
#destroy_server_group(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_server_group
instead -
#destroy_user_collaboration(identifier) ⇒ Object
deprecated
Deprecated.
Use
#delete_user_collaboration
instead -
#get_account(identifier = nil) ⇒ Hash
Get full details of the account.
-
#get_api_client(identifier) ⇒ Hash
Get full details of the API client.
-
#get_application(identifier) ⇒ Hash
Get full details of the application.
-
#get_authenticated_user ⇒ Hash
Requests details about authenticated user from the API.
-
#get_cloud_ip(identifier) ⇒ Hash
Get full details of the cloud IP address.
-
#get_collaboration(identifier) ⇒ Hash
Shows details of one collaboration.
-
#get_database_server(identifier) ⇒ Hash
If successful Hash version of JSON object.
-
#get_database_snapshot(identifier) ⇒ Hash
If successful Hash version of JSON object.
-
#get_database_type(identifier) ⇒ Hash
Get details of the database server type.
-
#get_firewall_policy(identifier) ⇒ Hash
Get details of the firewall policy.
-
#get_firewall_rule(identifier) ⇒ Hash
Get full details of the firewall rule.
-
#get_image(identifier) ⇒ Hash
Get full details of the image.
-
#get_interface(identifier) ⇒ Hash
Get full details of the interface.
-
#get_load_balancer(identifier) ⇒ Hash
Get full details of the load balancer.
-
#get_scoped_account ⇒ Hash
Requests details about currently scoped account.
-
#get_server(identifier) ⇒ Hash
Get full details of the server.
-
#get_server_group(identifier) ⇒ Hash
Get details of the server group.
-
#get_server_type(identifier) ⇒ Hash
Get full details of the server type.
-
#get_user(identifier = nil) ⇒ Hash
Get full details of the user.
-
#get_user_collaboration(identifier) ⇒ Hash
Shows details of one collaboration.
-
#get_zone(identifier) ⇒ Hash
Get full details of the zone.
-
#list_accounts ⇒ Hash
If successful Hash version of JSON object.
-
#list_api_clients ⇒ Hash
Lists summary details of API clients owned by the account.
-
#list_applications ⇒ Hash
Lists summary details of applications available to the user.
-
#list_cloud_ips ⇒ Hash
Lists summary details of cloud IP addresses owned by the account.
-
#list_collaborations ⇒ Hash
Lists all the account collaborations.
-
#list_database_servers ⇒ Hash
If successful Hash version of JSON object.
-
#list_database_snapshots ⇒ Hash
If successful Hash version of JSON object.
-
#list_database_types ⇒ Hash
List database server types.
-
#list_firewall_policies ⇒ Hash
Lists summary details of firewall policies.
-
#list_images ⇒ Hash
Lists summary details of images available for use by the Account.
-
#list_load_balancers ⇒ Hash
Lists summary details of load balancers owned by the account.
-
#list_server_groups ⇒ Hash
Lists summary details of server groups owned by the account.
-
#list_server_types ⇒ Hash
Lists summary details of server types available to the account.
-
#list_servers ⇒ Hash
Lists summary details of servers owned by the account.
-
#list_user_collaborations ⇒ Hash
Lists all collaborations the user is involved with.
-
#list_users ⇒ Hash
Lists summary details of user.
-
#list_zones ⇒ Hash
Lists summary details of zones available to the account.
-
#map_cloud_ip(identifier, options) ⇒ Hash, NilClass
Maps (or points) a cloud IP address at a server’s interface or a load balancer to allow them to respond to public requests.
-
#move_servers_server_group(identifier, options) ⇒ Hash, NilClass
Removes a number of server from the server group and adds them to another server group given in parameters.
-
#reject_user_collaboration(identifier) ⇒ Hash
Rejects the collaboration and removes the offer.
-
#remove_firewall_policy(identifier, options) ⇒ Hash, NilClass
Removes firewall policy from given server group.
-
#remove_listeners_load_balancer(identifier, options) ⇒ Hash, NilClass
Removes a number of listeners from a load balancer to cease balancing across nodes for those settings.
-
#remove_nodes_load_balancer(identifier, options) ⇒ Hash, NilClass
Remove a number of nodes from the load balancer.
-
#remove_servers_server_group(identifier, options) ⇒ Hash, NilClass
Remove a number of servers from the server group.
-
#request(*args) ⇒ Object
Makes an API request to the given path using passed options or those set with the service setup.
-
#resend_collaboration(identifier) ⇒ Hash
Resends the invitation email to the collaborator.
-
#reset_ftp_password_account(identifier = nil) ⇒ Hash
Reset the image library ftp password for the account.
-
#reset_ftp_password_scoped_account ⇒ Hash
Resets the image library ftp password for the scoped account.
-
#reset_password_database_server(identifier) ⇒ Hash
If successful Hash version of JSON object.
-
#reset_secret_api_client(identifier) ⇒ Hash
Resets the secret used by the API client to a new generated value.
-
#reset_secret_application(identifier) ⇒ Hash
Resets the secret used by the application to a new generated value.
-
#shutdown_server(identifier) ⇒ Hash
Will issue a safe shutdown request for the server.
-
#snapshot_database_server(identifier) ⇒ Hash
If successful Hash version of JSON object.
-
#snapshot_server(identifier) ⇒ Hash
Will issue a request to snapshot the Server.
-
#start_server(identifier) ⇒ Hash
Will issue a start request for the server to become active.
-
#stop_server(identifier) ⇒ Hash
Will issue a stop request for the server to become inactive.
-
#unmap_cloud_ip(identifier) ⇒ Hash
Unmaps a cloud IP address from its current destination making it available to remap.
-
#update_account(*args) ⇒ Hash, NilClass
Update some details of the account.
-
#update_api_client(identifier, options) ⇒ Hash, NilClass
Update some details of the API client.
-
#update_application(identifier, options) ⇒ Hash, NilClass
Update some details of the application.
-
#update_cloud_ip(identifier, options) ⇒ Hash, NilClass
Update some details of the cloud IP address.
- #update_database_server(identifier, options) ⇒ Hash, NilClass
-
#update_database_snapshot(identifier, options) ⇒ Hash, NilClass
Update some details of the server.
-
#update_firewall_policy(identifier, options) ⇒ Hash, NilClass
Updates details of the firewall policy.
-
#update_firewall_rule(identifier, options) ⇒ Hash, NilClass
Update some settings of the firewall rule.
-
#update_image(identifier, options) ⇒ Hash, NilClass
Update some details of the image.
-
#update_load_balancer(identifier, options) ⇒ Hash, NilClass
Update some details of the load balancer.
-
#update_scoped_account(options) ⇒ Hash, NilClass
Requests an update to the currently scoped account.
-
#update_server(identifier, options) ⇒ Hash, NilClass
Update some details of the server.
-
#update_server_group(identifier, options) ⇒ Hash, NilClass
Update some details of the server group.
-
#update_user(identifier, options) ⇒ Hash, NilClass
Update some details of your user profile.
-
#wrapped_request(method, path, expected_responses, parameters = {}) ⇒ Hash
Makes a request but with seperated arguments and parses the response to a hash.
Methods included from Brightbox::Compute::Shared
#access_token, #access_token_available?, #account, #authenticating_as_user?, #default_image, #expires_in, #get_access_token, #get_access_token!, #initialize, #refresh_token, #scoped_account, #scoped_account=, #scoped_account_reset
Methods included from Brightbox::OAuth2
Instance Method Details
#accept_user_collaboration(identifier) ⇒ Hash
Accepts the collaboration and gaining permitted access
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/accept_user_collaboration.rb', line 13 def accept_user_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/user/collaborations/#{identifier}/accept", [200]) end |
#activate_console_server(identifier) ⇒ Hash
Enable console access via VNC to the server for 15 minutes.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/activate_console_server.rb', line 13 def activate_console_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/servers/#{identifier}/activate_console", [202]) end |
#add_listeners_load_balancer(identifier, options) ⇒ Hash, NilClass
Adds a number of listeners to the load balancer to enable balancing across nodes for those settings.
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb', line 16 def add_listeners_load_balancer(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/load_balancers/#{identifier}/add_listeners", [202], ) end |
#add_nodes_load_balancer(identifier, options) ⇒ Hash, NilClass
Add a number of nodes to the load balancer
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb', line 16 def add_nodes_load_balancer(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/load_balancers/#{identifier}/add_nodes", [202], ) end |
#add_servers_server_group(identifier, options) ⇒ Hash, NilClass
Add a number of servers to the server group.
26 27 28 29 |
# File 'lib/fog/brightbox/requests/compute/add_servers_server_group.rb', line 26 def add_servers_server_group(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/server_groups/#{identifier}/add_servers", [202], ) end |
#apply_to_firewall_policy(identifier, options) ⇒ Hash, NilClass
Applies firewall policy to given server group
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb', line 16 def apply_to_firewall_policy(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/firewall_policies/#{identifier}/apply_to", [202], ) end |
#create_api_client(options) ⇒ Hash, NilClass
Create a new API client for the account.
16 17 18 |
# File 'lib/fog/brightbox/requests/compute/create_api_client.rb', line 16 def create_api_client() wrapped_request("post", "/1.0/api_clients", [201], ) end |
#create_application(options) ⇒ Hash, NilClass
Create a new application for the user.
16 17 18 |
# File 'lib/fog/brightbox/requests/compute/create_application.rb', line 16 def create_application() wrapped_request("post", "/1.0/applications", [201], ) end |
#create_cloud_ip(options = {}) ⇒ Hash, NilClass
Requests a new cloud IP address for the account.
17 18 19 |
# File 'lib/fog/brightbox/requests/compute/create_cloud_ip.rb', line 17 def create_cloud_ip( = {}) wrapped_request("post", "/1.0/cloud_ips", [201], ) end |
#create_collaboration(options) ⇒ Hash, NilClass
Creates a new collaboration for a user for the account
16 17 18 |
# File 'lib/fog/brightbox/requests/compute/create_collaboration.rb', line 16 def create_collaboration() wrapped_request("post", "/1.0/collaborations", [201], ) end |
#create_database_server(options) ⇒ Hash, NilClass
18 19 20 |
# File 'lib/fog/brightbox/requests/compute/create_database_server.rb', line 18 def create_database_server() wrapped_request("post", "/1.0/database_servers", [202], ) end |
#create_firewall_policy(options) ⇒ Hash, NilClass
Create a new firewall policy for the account.
Optionally applying to a server group at creation time.
19 20 21 |
# File 'lib/fog/brightbox/requests/compute/create_firewall_policy.rb', line 19 def create_firewall_policy() wrapped_request("post", "/1.0/firewall_policies", [201], ) end |
#create_firewall_rule(options) ⇒ Hash, NilClass
Create a new firewall rule for a firewall policy.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/create_firewall_rule.rb', line 22 def create_firewall_rule() wrapped_request("post", "/1.0/firewall_rules", [202], ) end |
#create_image(options) ⇒ Hash, NilClass
Create a new image for the account by registering it against an image stored within the Brightbox cloud image library.
The disk image must be in place before you can attempt to create a reference in the API.
23 24 25 |
# File 'lib/fog/brightbox/requests/compute/create_image.rb', line 23 def create_image() wrapped_request("post", "/1.0/images", [201], ) end |
#create_load_balancer(options) ⇒ Hash, NilClass
Create a new load balancer for the account.
19 20 21 |
# File 'lib/fog/brightbox/requests/compute/create_load_balancer.rb', line 19 def create_load_balancer() wrapped_request("post", "/1.0/load_balancers", [202], ) end |
#create_server(options) ⇒ Hash, NilClass
Create a new server for the account based on the required disk image.
Optionally can setup the type of server, zone to locate it, groups to join and custom metadata.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/create_server.rb', line 22 def create_server() wrapped_request("post", "/1.0/servers", [202], ) end |
#create_server_group(options) ⇒ Hash, NilClass
Create a new server group for the account.
16 17 18 |
# File 'lib/fog/brightbox/requests/compute/create_server_group.rb', line 16 def create_server_group() wrapped_request("post", "/1.0/server_groups", [202], ) end |
#delete_api_client(identifier) ⇒ Hash
Destroy the API client.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_api_client.rb', line 13 def delete_api_client(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/api_clients/#{identifier}", [200]) end |
#delete_application(identifier) ⇒ Hash
Destroy the application.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_application.rb', line 13 def delete_application(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/applications/#{identifier}", [200]) end |
#delete_cloud_ip(identifier) ⇒ Hash
Release the cloud IP address from the account’s ownership.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_cloud_ip.rb', line 13 def delete_cloud_ip(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/cloud_ips/#{identifier}", [200]) end |
#delete_collaboration(identifier) ⇒ Hash
Cancels or completes the collaboration
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_collaboration.rb', line 13 def delete_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/collaborations/#{identifier}", [200]) end |
#delete_database_server(identifier) ⇒ Hash
Returns if successful Hash version of JSON object.
11 12 13 14 |
# File 'lib/fog/brightbox/requests/compute/delete_database_server.rb', line 11 def delete_database_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/database_servers/#{identifier}", [202]) end |
#delete_database_snapshot(identifier) ⇒ Hash
Returns if successful Hash version of JSON object.
11 12 13 14 |
# File 'lib/fog/brightbox/requests/compute/delete_database_snapshot.rb', line 11 def delete_database_snapshot(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/database_snapshots/#{identifier}", [202]) end |
#delete_firewall_policy(identifier) ⇒ Hash
Destroy the firewall policy if not in use.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_firewall_policy.rb', line 13 def delete_firewall_policy(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/firewall_policies/#{identifier}", [202]) end |
#delete_firewall_rule(identifier) ⇒ Hash
Destroy the firewall rule.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_firewall_rule.rb', line 13 def delete_firewall_rule(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/firewall_rules/#{identifier}", [202]) end |
#delete_image(identifier) ⇒ Hash
Destroy the image.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_image.rb', line 13 def delete_image(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/images/#{identifier}", [202]) end |
#delete_load_balancer(identifier) ⇒ Hash
Destroy the LoadBalancer
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_load_balancer.rb', line 13 def delete_load_balancer(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/load_balancers/#{identifier}", [202]) end |
#delete_server(identifier) ⇒ Hash
Destroy the server and free up the resources.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_server.rb', line 13 def delete_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/servers/#{identifier}", [202]) end |
#delete_server_group(identifier) ⇒ Hash
Destroy the server group if not in use.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_server_group.rb', line 13 def delete_server_group(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/server_groups/#{identifier}", [202]) end |
#delete_user_collaboration(identifier) ⇒ Hash
Ends an existing ‘accepted’ collaboration
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/delete_user_collaboration.rb', line 13 def delete_user_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("delete", "/1.0/user/collaborations/#{identifier}", [200]) end |
#destroy_api_client(identifier) ⇒ Object
Use #delete_api_client
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_api_client.rb', line 22 def destroy_api_client(identifier) delete_api_client(identifier) end |
#destroy_application(identifier) ⇒ Object
Use #delete_application
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_application.rb', line 22 def destroy_application(identifier) delete_application(identifier) end |
#destroy_cloud_ip(identifier) ⇒ Object
Use #delete_cloud_ip
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_cloud_ip.rb', line 22 def destroy_cloud_ip(identifier) delete_cloud_ip(identifier) end |
#destroy_collaboration(identifier) ⇒ Object
Use #delete_collaboration
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_collaboration.rb', line 22 def destroy_collaboration(identifier) delete_collaboration(identifier) end |
#destroy_database_server(identifier) ⇒ Object
Use #delete_database_server
instead
Old format of the delete request.
20 21 22 |
# File 'lib/fog/brightbox/requests/compute/delete_database_server.rb', line 20 def destroy_database_server(identifier) delete_database_server(identifier) end |
#destroy_database_snapshot(identifier) ⇒ Object
Use #delete_database_snapshot
instead
Old format of the delete request.
20 21 22 |
# File 'lib/fog/brightbox/requests/compute/delete_database_snapshot.rb', line 20 def destroy_database_snapshot(identifier) delete_database_snapshot(identifier) end |
#destroy_firewall_policy(identifier) ⇒ Object
Use #delete_firewall_policy
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_firewall_policy.rb', line 22 def destroy_firewall_policy(identifier) delete_firewall_policy(identifier) end |
#destroy_firewall_rule(identifier) ⇒ Object
Use #delete_firewall_rule
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_firewall_rule.rb', line 22 def destroy_firewall_rule(identifier) delete_firewall_rule(identifier) end |
#destroy_image(identifier) ⇒ Object
Use #delete_image
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_image.rb', line 22 def destroy_image(identifier) delete_image(identifier) end |
#destroy_load_balancer(identifier) ⇒ Object
Use #delete_load_balancer
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_load_balancer.rb', line 22 def destroy_load_balancer(identifier) delete_load_balancer(identifier) end |
#destroy_server(identifier) ⇒ Object
Use #delete_server
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_server.rb', line 22 def destroy_server(identifier) delete_server(identifier) end |
#destroy_server_group(identifier) ⇒ Object
Use #delete_server_group
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_server_group.rb', line 22 def destroy_server_group(identifier) delete_server_group(identifier) end |
#destroy_user_collaboration(identifier) ⇒ Object
Use #delete_user_collaboration
instead
Old format of the delete request.
22 23 24 |
# File 'lib/fog/brightbox/requests/compute/delete_user_collaboration.rb', line 22 def destroy_user_collaboration(identifier) delete_user_collaboration(identifier) end |
#get_account(identifier) ⇒ Hash #get_account ⇒ Hash
Get full details of the account.
17 18 19 20 21 22 23 24 |
# File 'lib/fog/brightbox/requests/compute/get_account.rb', line 17 def get_account(identifier = nil) if identifier.nil? || identifier.empty? Fog::Logger.deprecation("get_account() without a parameter is deprecated, use get_scoped_account instead [light_black](#{caller.first})[/]") get_scoped_account else wrapped_request("get", "/1.0/accounts/#{identifier}", [200]) end end |
#get_api_client(identifier) ⇒ Hash
Get full details of the API client.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_api_client.rb', line 13 def get_api_client(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/api_clients/#{identifier}", [200]) end |
#get_application(identifier) ⇒ Hash
Get full details of the application.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_application.rb', line 13 def get_application(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/applications/#{identifier}", [200]) end |
#get_authenticated_user ⇒ Hash
Requests details about authenticated user from the API
9 10 11 |
# File 'lib/fog/brightbox/requests/compute/get_authenticated_user.rb', line 9 def get_authenticated_user wrapped_request("get", "/1.0/user", [200]) end |
#get_cloud_ip(identifier) ⇒ Hash
Get full details of the cloud IP address.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_cloud_ip.rb', line 13 def get_cloud_ip(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/cloud_ips/#{identifier}", [200]) end |
#get_collaboration(identifier) ⇒ Hash
Shows details of one collaboration
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_collaboration.rb', line 13 def get_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/collaborations/#{identifier}", [200]) end |
#get_database_server(identifier) ⇒ Hash
Returns if successful Hash version of JSON object.
11 12 13 14 |
# File 'lib/fog/brightbox/requests/compute/get_database_server.rb', line 11 def get_database_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/database_servers/#{identifier}", [200]) end |
#get_database_snapshot(identifier) ⇒ Hash
Returns if successful Hash version of JSON object.
11 12 13 14 |
# File 'lib/fog/brightbox/requests/compute/get_database_snapshot.rb', line 11 def get_database_snapshot(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/database_snapshots/#{identifier}", [200]) end |
#get_database_type(identifier) ⇒ Hash
Get details of the database server type.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_database_type.rb', line 13 def get_database_type(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/database_types/#{identifier}", [200]) end |
#get_firewall_policy(identifier) ⇒ Hash
Get details of the firewall policy
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_firewall_policy.rb', line 13 def get_firewall_policy(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/firewall_policies/#{identifier}", [200]) end |
#get_firewall_rule(identifier) ⇒ Hash
Get full details of the firewall rule.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_firewall_rule.rb', line 13 def get_firewall_rule(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/firewall_rules/#{identifier}", [200]) end |
#get_image(identifier) ⇒ Hash
Get full details of the image.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_image.rb', line 13 def get_image(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/images/#{identifier}", [200]) end |
#get_interface(identifier) ⇒ Hash
Get full details of the interface.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_interface.rb', line 13 def get_interface(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/interfaces/#{identifier}", [200]) end |
#get_load_balancer(identifier) ⇒ Hash
Get full details of the load balancer.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_load_balancer.rb', line 13 def get_load_balancer(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/load_balancers/#{identifier}", [200]) end |
#get_scoped_account ⇒ Hash
Requests details about currently scoped account
8 9 10 |
# File 'lib/fog/brightbox/requests/compute/get_scoped_account.rb', line 8 def get_scoped_account wrapped_request("get", "/1.0/account", [200]) end |
#get_server(identifier) ⇒ Hash
Get full details of the server.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_server.rb', line 13 def get_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/servers/#{identifier}", [200]) end |
#get_server_group(identifier) ⇒ Hash
Get details of the server group.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_server_group.rb', line 13 def get_server_group(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/server_groups/#{identifier}", [200]) end |
#get_server_type(identifier) ⇒ Hash
Get full details of the server type.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_server_type.rb', line 13 def get_server_type(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/server_types/#{identifier}", [200]) end |
#get_user(identifier) ⇒ Hash #get_user ⇒ Hash
Get full details of the user.
17 18 19 20 21 22 23 24 |
# File 'lib/fog/brightbox/requests/compute/get_user.rb', line 17 def get_user(identifier = nil) if identifier.nil? || identifier == "" Fog::Logger.deprecation("get_user() without a parameter is deprecated, use get_authenticated_user instead [light_black](#{caller.first})[/]") get_authenticated_user else wrapped_request("get", "/1.0/users/#{identifier}", [200]) end end |
#get_user_collaboration(identifier) ⇒ Hash
Shows details of one collaboration
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_user_collaboration.rb', line 13 def get_user_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/user/collaborations/#{identifier}", [200]) end |
#get_zone(identifier) ⇒ Hash
Get full details of the zone.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/get_zone.rb', line 13 def get_zone(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("get", "/1.0/zones/#{identifier}", [200]) end |
#list_accounts ⇒ Hash
Returns if successful Hash version of JSON object.
10 11 12 |
# File 'lib/fog/brightbox/requests/compute/list_accounts.rb', line 10 def list_accounts wrapped_request("get", "/1.0/accounts", [200]) end |
#list_api_clients ⇒ Hash
Lists summary details of API clients owned by the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_api_clients.rb', line 12 def list_api_clients wrapped_request("get", "/1.0/api_clients", [200]) end |
#list_applications ⇒ Hash
Lists summary details of applications available to the user
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_applications.rb', line 12 def list_applications wrapped_request("get", "/1.0/applications", [200]) end |
#list_cloud_ips ⇒ Hash
Lists summary details of cloud IP addresses owned by the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_cloud_ips.rb', line 12 def list_cloud_ips wrapped_request("get", "/1.0/cloud_ips", [200]) end |
#list_collaborations ⇒ Hash
Lists all the account collaborations
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_collaborations.rb', line 12 def list_collaborations wrapped_request("get", "/1.0/collaborations", [200]) end |
#list_database_servers ⇒ Hash
Returns if successful Hash version of JSON object.
10 11 12 |
# File 'lib/fog/brightbox/requests/compute/list_database_servers.rb', line 10 def list_database_servers wrapped_request("get", "/1.0/database_servers", [200]) end |
#list_database_snapshots ⇒ Hash
Returns if successful Hash version of JSON object.
10 11 12 |
# File 'lib/fog/brightbox/requests/compute/list_database_snapshots.rb', line 10 def list_database_snapshots wrapped_request("get", "/1.0/database_snapshots", [200]) end |
#list_database_types ⇒ Hash
List database server types.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_database_types.rb', line 12 def list_database_types wrapped_request("get", "/1.0/database_types", [200]) end |
#list_firewall_policies ⇒ Hash
Lists summary details of firewall policies
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_firewall_policies.rb', line 12 def list_firewall_policies wrapped_request("get", "/1.0/firewall_policies", [200]) end |
#list_images ⇒ Hash
Lists summary details of images available for use by the Account. It includes those available to all customers
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_images.rb', line 12 def list_images wrapped_request("get", "/1.0/images", [200]) end |
#list_load_balancers ⇒ Hash
Lists summary details of load balancers owned by the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_load_balancers.rb', line 12 def list_load_balancers wrapped_request("get", "/1.0/load_balancers", [200]) end |
#list_server_groups ⇒ Hash
Lists summary details of server groups owned by the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_server_groups.rb', line 12 def list_server_groups wrapped_request("get", "/1.0/server_groups", [200]) end |
#list_server_types ⇒ Hash
Lists summary details of server types available to the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_server_types.rb', line 12 def list_server_types wrapped_request("get", "/1.0/server_types", [200]) end |
#list_servers ⇒ Hash
Lists summary details of servers owned by the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_servers.rb', line 12 def list_servers wrapped_request("get", "/1.0/servers", [200]) end |
#list_user_collaborations ⇒ Hash
Lists all collaborations the user is involved with
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_user_collaborations.rb', line 12 def list_user_collaborations wrapped_request("get", "/1.0/user/collaborations", [200]) end |
#list_users ⇒ Hash
Lists summary details of user.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_users.rb', line 12 def list_users wrapped_request("get", "/1.0/users", [200]) end |
#list_zones ⇒ Hash
Lists summary details of zones available to the account.
12 13 14 |
# File 'lib/fog/brightbox/requests/compute/list_zones.rb', line 12 def list_zones wrapped_request("get", "/1.0/zones", [200]) end |
#map_cloud_ip(identifier, options) ⇒ Hash, NilClass
Maps (or points) a cloud IP address at a server’s interface or a load balancer to allow them to respond to public requests.
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/map_cloud_ip.rb', line 16 def map_cloud_ip(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/cloud_ips/#{identifier}/map", [202], ) end |
#move_servers_server_group(identifier, options) ⇒ Hash, NilClass
Removes a number of server from the server group and adds them to another server group given in parameters.
28 29 30 31 |
# File 'lib/fog/brightbox/requests/compute/move_servers_server_group.rb', line 28 def move_servers_server_group(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/server_groups/#{identifier}/move_servers", [202], ) end |
#reject_user_collaboration(identifier) ⇒ Hash
Rejects the collaboration and removes the offer
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/reject_user_collaboration.rb', line 13 def reject_user_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/user/collaborations/#{identifier}/reject", [200]) end |
#remove_firewall_policy(identifier, options) ⇒ Hash, NilClass
Removes firewall policy from given server group
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/remove_firewall_policy.rb', line 16 def remove_firewall_policy(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/firewall_policies/#{identifier}/remove", [202], ) end |
#remove_listeners_load_balancer(identifier, options) ⇒ Hash, NilClass
Removes a number of listeners from a load balancer to cease balancing across nodes for those settings.
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb', line 16 def remove_listeners_load_balancer(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/load_balancers/#{identifier}/remove_listeners", [202], ) end |
#remove_nodes_load_balancer(identifier, options) ⇒ Hash, NilClass
Remove a number of nodes from the load balancer
16 17 18 19 |
# File 'lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb', line 16 def remove_nodes_load_balancer(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/load_balancers/#{identifier}/remove_nodes", [202], ) end |
#remove_servers_server_group(identifier, options) ⇒ Hash, NilClass
Remove a number of servers from the server group.
26 27 28 29 |
# File 'lib/fog/brightbox/requests/compute/remove_servers_server_group.rb', line 26 def remove_servers_server_group(identifier, ) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/server_groups/#{identifier}/remove_servers", [202], ) end |
#request(params) ⇒ Excon::Response #request(method, path, expected_responses, params = {}) ⇒ Hash
Standard Fog behaviour is to return the Excon::Response but this was unintentionally changed to be the Hash version of the data in the body. This loses access to some details and should be corrected in a backwards compatible manner
Makes an API request to the given path using passed options or those set with the service setup
234 235 236 237 238 239 240 241 |
# File 'lib/fog/brightbox/compute.rb', line 234 def request(*args) if args.size == 1 authenticated_request(*args) else Fog::Logger.deprecation("#request with multiple parameters is deprecated, use #wrapped_request instead [light_black](#{caller.first})[/]") wrapped_request(*args) end end |
#resend_collaboration(identifier) ⇒ Hash
Resends the invitation email to the collaborator
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/resend_collaboration.rb', line 13 def resend_collaboration(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/collaborations/#{identifier}/resend", [200]) end |
#reset_ftp_password_account(identifier) ⇒ Hash #reset_ftp_password_account ⇒ Hash
The response is the only time the new password is available in plaintext.
Reset the image library ftp password for the account.
20 21 22 23 24 25 26 27 |
# File 'lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb', line 20 def reset_ftp_password_account(identifier = nil) if identifier.nil? || identifier.empty? Fog::Logger.deprecation("reset_ftp_password_account() without a parameter is deprecated, use reset_ftp_password_scoped_account instead [light_black](#{caller.first})[/]") reset_ftp_password_scoped_account else wrapped_request("post", "/1.0/accounts/#{identifier}/reset_ftp_password", [200]) end end |
#reset_ftp_password_scoped_account ⇒ Hash
The response is the only time the new password is available in plaintext.
Resets the image library ftp password for the scoped account
11 12 13 |
# File 'lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb', line 11 def reset_ftp_password_scoped_account wrapped_request("post", "/1.0/account/reset_ftp_password", [200]) end |
#reset_password_database_server(identifier) ⇒ Hash
Returns if successful Hash version of JSON object.
11 12 13 14 |
# File 'lib/fog/brightbox/requests/compute/reset_password_database_server.rb', line 11 def reset_password_database_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/database_servers/#{identifier}/reset_password", [202]) end |
#reset_secret_api_client(identifier) ⇒ Hash
Resets the secret used by the API client to a new generated value.
The response is the only time the new secret is available in plaintext.
Already authenticated tokens will still continue to be valid until expiry.
17 18 19 20 |
# File 'lib/fog/brightbox/requests/compute/reset_secret_api_client.rb', line 17 def reset_secret_api_client(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/api_clients/#{identifier}/reset_secret", [200]) end |
#reset_secret_application(identifier) ⇒ Hash
Resets the secret used by the application to a new generated value.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/reset_secret_application.rb', line 13 def reset_secret_application(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/applications/#{identifier}/reset_secret", [200]) end |
#shutdown_server(identifier) ⇒ Hash
Will issue a safe shutdown request for the server.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/shutdown_server.rb', line 13 def shutdown_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/servers/#{identifier}/shutdown", [202]) end |
#snapshot_database_server(identifier) ⇒ Hash
Returns if successful Hash version of JSON object.
11 12 13 14 |
# File 'lib/fog/brightbox/requests/compute/snapshot_database_server.rb', line 11 def snapshot_database_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/database_servers/#{identifier}/snapshot", [202]) end |
#snapshot_server(identifier) ⇒ Hash
Will issue a request to snapshot the Server
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/snapshot_server.rb', line 13 def snapshot_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/servers/#{identifier}/snapshot", [202]) end |
#start_server(identifier) ⇒ Hash
Will issue a start request for the server to become active.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/start_server.rb', line 13 def start_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/servers/#{identifier}/start", [202]) end |
#stop_server(identifier) ⇒ Hash
Will issue a stop request for the server to become inactive.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/stop_server.rb', line 13 def stop_server(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/servers/#{identifier}/stop", [202]) end |
#unmap_cloud_ip(identifier) ⇒ Hash
Unmaps a cloud IP address from its current destination making it available to remap. This remains in the account’s pool of addresses.
13 14 15 16 |
# File 'lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb', line 13 def unmap_cloud_ip(identifier) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/cloud_ips/#{identifier}/unmap", [202]) end |
#update_account(identifier, options) ⇒ Hash, NilClass #update_account(options) ⇒ Hash, NilClass
Update some details of the account.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fog/brightbox/requests/compute/update_account.rb', line 39 def update_account(*args) if args.size == 2 identifier = args[0] = args[1] elsif args.size == 1 = args[0] else raise ArgumentError, "wrong number of arguments (0 for 2)" end return nil if .empty? || .nil? if identifier.nil? || identifier.empty? Fog::Logger.deprecation("update_account() without a parameter is deprecated, use update_scoped_account instead [light_black](#{caller.first})[/]") update_scoped_account() else wrapped_request("put", "/1.0/accounts/#{identifier}", [200], ) end end |
#update_api_client(identifier, options) ⇒ Hash, NilClass
Update some details of the API client.
17 18 19 20 21 |
# File 'lib/fog/brightbox/requests/compute/update_api_client.rb', line 17 def update_api_client(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/api_clients/#{identifier}", [200], ) end |
#update_application(identifier, options) ⇒ Hash, NilClass
Update some details of the application.
17 18 19 20 21 |
# File 'lib/fog/brightbox/requests/compute/update_application.rb', line 17 def update_application(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/applications/#{identifier}", [200], ) end |
#update_cloud_ip(identifier, options) ⇒ Hash, NilClass
Update some details of the cloud IP address.
18 19 20 21 22 |
# File 'lib/fog/brightbox/requests/compute/update_cloud_ip.rb', line 18 def update_cloud_ip(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/cloud_ips/#{identifier}", [200], ) end |
#update_database_server(identifier, options) ⇒ Hash, NilClass
16 17 18 19 20 |
# File 'lib/fog/brightbox/requests/compute/update_database_server.rb', line 16 def update_database_server(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/database_servers/#{identifier}", [200], ) end |
#update_database_snapshot(identifier, options) ⇒ Hash, NilClass
Update some details of the server.
17 18 19 20 21 |
# File 'lib/fog/brightbox/requests/compute/update_database_snapshot.rb', line 17 def update_database_snapshot(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/database_snapshots/#{identifier}", [200], ) end |
#update_firewall_policy(identifier, options) ⇒ Hash, NilClass
Updates details of the firewall policy
17 18 19 20 21 |
# File 'lib/fog/brightbox/requests/compute/update_firewall_policy.rb', line 17 def update_firewall_policy(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/firewall_policies/#{identifier}", [200], ) end |
#update_firewall_rule(identifier, options) ⇒ Hash, NilClass
Update some settings of the firewall rule.
22 23 24 25 26 |
# File 'lib/fog/brightbox/requests/compute/update_firewall_rule.rb', line 22 def update_firewall_rule(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/firewall_rules/#{identifier}", [202], ) end |
#update_image(identifier, options) ⇒ Hash, NilClass
Update some details of the image.
22 23 24 25 26 |
# File 'lib/fog/brightbox/requests/compute/update_image.rb', line 22 def update_image(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/images/#{identifier}", [200], ) end |
#update_load_balancer(identifier, options) ⇒ Hash, NilClass
Update some details of the load balancer.
20 21 22 23 24 |
# File 'lib/fog/brightbox/requests/compute/update_load_balancer.rb', line 20 def update_load_balancer(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/load_balancers/#{identifier}", [202], ) end |
#update_scoped_account(options) ⇒ Hash, NilClass
Requests an update to the currently scoped account
23 24 25 26 |
# File 'lib/fog/brightbox/requests/compute/update_scoped_account.rb', line 23 def update_scoped_account() return nil if .empty? || .nil? wrapped_request("put", "/1.0/account", [200], ) end |
#update_server(identifier, options) ⇒ Hash, NilClass
Update some details of the server.
19 20 21 22 23 |
# File 'lib/fog/brightbox/requests/compute/update_server.rb', line 19 def update_server(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/servers/#{identifier}", [200], ) end |
#update_server_group(identifier, options) ⇒ Hash, NilClass
Update some details of the server group.
17 18 19 20 21 |
# File 'lib/fog/brightbox/requests/compute/update_server_group.rb', line 17 def update_server_group(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/server_groups/#{identifier}", [202], ) end |
#update_user(identifier, options) ⇒ Hash, NilClass
Update some details of your user profile.
20 21 22 23 24 |
# File 'lib/fog/brightbox/requests/compute/update_user.rb', line 20 def update_user(identifier, ) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? wrapped_request("put", "/1.0/users/#{identifier}", [200], ) end |
#wrapped_request(method, path, expected_responses, parameters = {}) ⇒ Hash
#wrapped_request is the non-standard form of request introduced by mistake
Makes a request but with seperated arguments and parses the response to a hash
254 255 256 |
# File 'lib/fog/brightbox/compute.rb', line 254 def wrapped_request(method, path, expected_responses, parameters = {}) _wrapped_request(method, path, expected_responses, parameters) end |