Class: Fog::Compute::Brightbox::Real
- Inherits:
-
Object
- Object
- Fog::Compute::Brightbox::Real
- Defined in:
- lib/fog/compute/brightbox.rb,
lib/fog/compute/requests/brightbox/get_user.rb,
lib/fog/compute/requests/brightbox/get_zone.rb,
lib/fog/compute/requests/brightbox/get_image.rb,
lib/fog/compute/requests/brightbox/get_server.rb,
lib/fog/compute/requests/brightbox/list_users.rb,
lib/fog/compute/requests/brightbox/list_zones.rb,
lib/fog/compute/requests/brightbox/get_account.rb,
lib/fog/compute/requests/brightbox/list_images.rb,
lib/fog/compute/requests/brightbox/stop_server.rb,
lib/fog/compute/requests/brightbox/update_user.rb,
lib/fog/compute/requests/brightbox/create_image.rb,
lib/fog/compute/requests/brightbox/get_cloud_ip.rb,
lib/fog/compute/requests/brightbox/list_servers.rb,
lib/fog/compute/requests/brightbox/map_cloud_ip.rb,
lib/fog/compute/requests/brightbox/start_server.rb,
lib/fog/compute/requests/brightbox/update_image.rb,
lib/fog/compute/requests/brightbox/create_server.rb,
lib/fog/compute/requests/brightbox/destroy_image.rb,
lib/fog/compute/requests/brightbox/get_interface.rb,
lib/fog/compute/requests/brightbox/resize_server.rb,
lib/fog/compute/requests/brightbox/update_server.rb,
lib/fog/compute/requests/brightbox/destroy_server.rb,
lib/fog/compute/requests/brightbox/get_api_client.rb,
lib/fog/compute/requests/brightbox/list_cloud_ips.rb,
lib/fog/compute/requests/brightbox/unmap_cloud_ip.rb,
lib/fog/compute/requests/brightbox/update_account.rb,
lib/fog/compute/requests/brightbox/create_cloud_ip.rb,
lib/fog/compute/requests/brightbox/get_server_type.rb,
lib/fog/compute/requests/brightbox/shutdown_server.rb,
lib/fog/compute/requests/brightbox/snapshot_server.rb,
lib/fog/compute/requests/brightbox/destroy_cloud_ip.rb,
lib/fog/compute/requests/brightbox/list_api_clients.rb,
lib/fog/compute/requests/brightbox/create_api_client.rb,
lib/fog/compute/requests/brightbox/get_load_balancer.rb,
lib/fog/compute/requests/brightbox/list_server_types.rb,
lib/fog/compute/requests/brightbox/update_api_client.rb,
lib/fog/compute/requests/brightbox/destroy_api_client.rb,
lib/fog/compute/requests/brightbox/list_load_balancers.rb,
lib/fog/compute/requests/brightbox/create_load_balancer.rb,
lib/fog/compute/requests/brightbox/update_load_balancer.rb,
lib/fog/compute/requests/brightbox/destroy_load_balancer.rb,
lib/fog/compute/requests/brightbox/activate_console_server.rb,
lib/fog/compute/requests/brightbox/add_nodes_load_balancer.rb,
lib/fog/compute/requests/brightbox/remove_nodes_load_balancer.rb,
lib/fog/compute/requests/brightbox/reset_ftp_password_account.rb,
lib/fog/compute/requests/brightbox/add_listeners_load_balancer.rb,
lib/fog/compute/requests/brightbox/remove_listeners_load_balancer.rb
Instance Method Summary collapse
- #account ⇒ Object
- #activate_console_server(identifier, options = {}) ⇒ Object
- #add_listeners_load_balancer(identifier, options = {}) ⇒ Object
- #add_nodes_load_balancer(identifier, options = {}) ⇒ Object
- #create_api_client(options = {}) ⇒ Object
- #create_cloud_ip(options = {}) ⇒ Object
- #create_image(options = {}) ⇒ Object
- #create_load_balancer(options = {}) ⇒ Object
- #create_server(options = {}) ⇒ Object
- #destroy_api_client(identifier, options = {}) ⇒ Object
- #destroy_cloud_ip(identifier, options = {}) ⇒ Object
- #destroy_image(identifier, options = {}) ⇒ Object
- #destroy_load_balancer(identifier, options = {}) ⇒ Object
- #destroy_server(identifier, options = {}) ⇒ Object
- #get_account(options = {}) ⇒ Object
- #get_api_client(identifier, options = {}) ⇒ Object
- #get_cloud_ip(identifier, options = {}) ⇒ Object
- #get_image(identifier, options = {}) ⇒ Object
- #get_interface(identifier, options = {}) ⇒ Object
- #get_load_balancer(identifier, options = {}) ⇒ Object
- #get_server(identifier, options = {}) ⇒ Object
- #get_server_type(identifier, options = {}) ⇒ Object
- #get_user(identifier, options = {}) ⇒ Object
- #get_zone(identifier, options = {}) ⇒ Object
-
#initialize(options) ⇒ Real
constructor
A new instance of Real.
- #list_api_clients(options = {}) ⇒ Object
- #list_cloud_ips(options = {}) ⇒ Object
- #list_images(options = {}) ⇒ Object
- #list_load_balancers(options = {}) ⇒ Object
- #list_server_types(options = {}) ⇒ Object
- #list_servers(options = {}) ⇒ Object
- #list_users(options = {}) ⇒ Object
- #list_zones(options = {}) ⇒ Object
- #map_cloud_ip(identifier, options = {}) ⇒ Object
- #remove_listeners_load_balancer(identifier, options = {}) ⇒ Object
- #remove_nodes_load_balancer(identifier, options = {}) ⇒ Object
- #request(params) ⇒ Object
- #reset_ftp_password_account(options = {}) ⇒ Object
- #resize_server(identifier, options = {}) ⇒ Object
- #shutdown_server(identifier, options = {}) ⇒ Object
- #snapshot_server(identifier, options = {}) ⇒ Object
- #start_server(identifier, options = {}) ⇒ Object
- #stop_server(identifier, options = {}) ⇒ Object
- #unmap_cloud_ip(identifier, options = {}) ⇒ Object
- #update_account(options = {}) ⇒ Object
- #update_api_client(identifier, options = {}) ⇒ Object
- #update_image(identifier, options = {}) ⇒ Object
- #update_load_balancer(identifier, options = {}) ⇒ Object
- #update_server(identifier, options = {}) ⇒ Object
- #update_user(identifier, options = {}) ⇒ Object
Constructor Details
#initialize(options) ⇒ Real
Returns a new instance of Real.
90 91 92 93 94 95 96 97 98 |
# File 'lib/fog/compute/brightbox.rb', line 90 def initialize() require "json" # Currently authentication and api endpoints are the same but may change @auth_url = [:brightbox_auth_url] || Fog.credentials[:brightbox_auth_url] || API_URL @api_url = [:brightbox_api_url] || Fog.credentials[:brightbox_api_url] || API_URL @brightbox_client_id = [:brightbox_client_id] || Fog.credentials[:brightbox_client_id] @brightbox_secret = [:brightbox_secret] || Fog.credentials[:brightbox_secret] @connection = Fog::Connection.new(@api_url) end |
Instance Method Details
#account ⇒ Object
113 114 115 |
# File 'lib/fog/compute/brightbox.rb', line 113 def account Fog::Compute::Brightbox::Account.new(get_account) end |
#activate_console_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/activate_console_server.rb', line 6 def activate_console_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/servers/#{identifier}/activate_console", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#add_listeners_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/add_listeners_load_balancer.rb', line 6 def add_listeners_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/load_balancers/#{identifier}/add_listeners", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#add_nodes_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/add_nodes_load_balancer.rb', line 6 def add_nodes_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/load_balancers/#{identifier}/add_nodes", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#create_api_client(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/create_api_client.rb', line 6 def create_api_client( = {}) request( :expects => [201], :method => 'POST', :path => "/1.0/api_clients", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#create_cloud_ip(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/create_cloud_ip.rb', line 6 def create_cloud_ip( = {}) request( :expects => [201], :method => 'POST', :path => "/1.0/cloud_ips", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#create_image(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/create_image.rb', line 6 def create_image( = {}) request( :expects => [201], :method => 'POST', :path => "/1.0/images", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#create_load_balancer(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/create_load_balancer.rb', line 6 def create_load_balancer( = {}) request( :expects => [202], :method => 'POST', :path => "/1.0/load_balancers", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#create_server(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/create_server.rb', line 6 def create_server( = {}) request( :expects => [202], :method => 'POST', :path => "/1.0/servers", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#destroy_api_client(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/destroy_api_client.rb', line 6 def destroy_api_client(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'DELETE', :path => "/1.0/api_clients/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#destroy_cloud_ip(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/destroy_cloud_ip.rb', line 6 def destroy_cloud_ip(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'DELETE', :path => "/1.0/cloud_ips/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#destroy_image(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/destroy_image.rb', line 6 def destroy_image(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'DELETE', :path => "/1.0/images/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#destroy_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/destroy_load_balancer.rb', line 6 def destroy_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'DELETE', :path => "/1.0/load_balancers/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#destroy_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/destroy_server.rb', line 6 def destroy_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'DELETE', :path => "/1.0/servers/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_account(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/get_account.rb', line 6 def get_account( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/account", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_api_client(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_api_client.rb', line 6 def get_api_client(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/api_clients/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_cloud_ip(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_cloud_ip.rb', line 6 def get_cloud_ip(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/cloud_ips/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_image(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_image.rb', line 6 def get_image(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/images/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_interface(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_interface.rb', line 6 def get_interface(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/interfaces/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_load_balancer.rb', line 6 def get_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/load_balancers/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_server.rb', line 6 def get_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/servers/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_server_type(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_server_type.rb', line 6 def get_server_type(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/server_types/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_user(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_user.rb', line 6 def get_user(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/users/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#get_zone(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/get_zone.rb', line 6 def get_zone(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [200], :method => 'GET', :path => "/1.0/zones/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_api_clients(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_api_clients.rb', line 6 def list_api_clients( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/api_clients", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_cloud_ips(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_cloud_ips.rb', line 6 def list_cloud_ips( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/cloud_ips", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_images(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_images.rb', line 6 def list_images( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/images", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_load_balancers(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_load_balancers.rb', line 6 def list_load_balancers( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/load_balancers", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_server_types(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_server_types.rb', line 6 def list_server_types( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/server_types", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_servers(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_servers.rb', line 6 def list_servers( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/servers", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_users(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_users.rb', line 6 def list_users( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/users", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#list_zones(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/list_zones.rb', line 6 def list_zones( = {}) request( :expects => [200], :method => 'GET', :path => "/1.0/zones", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#map_cloud_ip(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/map_cloud_ip.rb', line 6 def map_cloud_ip(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/cloud_ips/#{identifier}/map", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#remove_listeners_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/remove_listeners_load_balancer.rb', line 6 def remove_listeners_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/load_balancers/#{identifier}/remove_listeners", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#remove_nodes_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/remove_nodes_load_balancer.rb', line 6 def remove_nodes_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/load_balancers/#{identifier}/remove_nodes", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#request(params) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/fog/compute/brightbox.rb', line 100 def request(params) begin get_oauth_token if @oauth_token.nil? response = authenticated_request(params) rescue Excon::Errors::Unauthorized => e get_oauth_token response = authenticated_request(params) end unless response.body.empty? response = JSON.parse(response.body) end end |
#reset_ftp_password_account(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/reset_ftp_password_account.rb', line 6 def reset_ftp_password_account( = {}) request( :expects => [200], :method => 'POST', :path => "/1.0/account/reset_ftp_password", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#resize_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/requests/brightbox/resize_server.rb', line 6 def resize_server(identifier, = {}) request( :expects => [202], :method => 'POST', :path => "/1.0/servers/#{identifier}/resize", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#shutdown_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/shutdown_server.rb', line 6 def shutdown_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/servers/#{identifier}/shutdown", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#snapshot_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/snapshot_server.rb', line 6 def snapshot_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/servers/#{identifier}/snapshot", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#start_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/start_server.rb', line 6 def start_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/servers/#{identifier}/start", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#stop_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/stop_server.rb', line 6 def stop_server(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/servers/#{identifier}/stop", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#unmap_cloud_ip(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/unmap_cloud_ip.rb', line 6 def unmap_cloud_ip(identifier, = {}) return nil if identifier.nil? || identifier == "" request( :expects => [202], :method => 'POST', :path => "/1.0/cloud_ips/#{identifier}/unmap", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#update_account(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/compute/requests/brightbox/update_account.rb', line 6 def update_account( = {}) return nil if .empty? || .nil? request( :expects => [200], :method => 'PUT', :path => "/1.0/account", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#update_api_client(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/compute/requests/brightbox/update_api_client.rb', line 6 def update_api_client(identifier, = {}) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? request( :expects => [200], :method => 'PUT', :path => "/1.0/api_clients/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#update_image(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/compute/requests/brightbox/update_image.rb', line 6 def update_image(identifier, = {}) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? request( :expects => [200], :method => 'PUT', :path => "/1.0/images/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#update_load_balancer(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/compute/requests/brightbox/update_load_balancer.rb', line 6 def update_load_balancer(identifier, = {}) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? request( :expects => [202], :method => 'PUT', :path => "/1.0/load_balancers/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#update_server(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/compute/requests/brightbox/update_server.rb', line 6 def update_server(identifier, = {}) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? request( :expects => [200], :method => 'PUT', :path => "/1.0/servers/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |
#update_user(identifier, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/compute/requests/brightbox/update_user.rb', line 6 def update_user(identifier, = {}) return nil if identifier.nil? || identifier == "" return nil if .empty? || .nil? request( :expects => [200], :method => 'PUT', :path => "/1.0/users/#{identifier}", :headers => {"Content-Type" => "application/json"}, :body => .to_json ) end |