1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[brightbox] Added listener management (add/remove) requests for Load Balancers

This commit is contained in:
Paul Thornthwaite 2011-03-02 00:12:04 +08:00 committed by Wesley Beary
parent 8af0538cd9
commit 9a755ee209
3 changed files with 42 additions and 0 deletions

View file

@ -26,6 +26,7 @@ module Fog
model :user
request_path 'fog/compute/requests/brightbox'
request :add_listeners_load_balancer
request :add_nodes_load_balancer
request :create_api_client
request :create_cloud_ip
@ -56,6 +57,7 @@ module Fog
request :list_users
request :list_zones
request :map_cloud_ip
request :remove_listeners_load_balancer
request :remove_nodes_load_balancer
request :reset_ftp_password_account
request :resize_server

View file

@ -0,0 +1,20 @@
module Fog
module Brightbox
class Compute
class Real
def add_listeners_load_balancer(identifier, options = {})
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 => options.to_json
)
end
end
end
end
end

View file

@ -0,0 +1,20 @@
module Fog
module Brightbox
class Compute
class Real
def remove_listeners_load_balancer(identifier, options = {})
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 => options.to_json
)
end
end
end
end
end