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:
parent
8af0538cd9
commit
9a755ee209
3 changed files with 42 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue