mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|lb] Added list parameter for nodeddress
This commit is contained in:
parent
eb046bf24d
commit
93df5bfb2f
2 changed files with 11 additions and 2 deletions
|
@ -2,11 +2,17 @@ module Fog
|
|||
module Rackspace
|
||||
class LoadBalancers
|
||||
class Real
|
||||
def list_load_balancers
|
||||
def list_load_balancers(options = {})
|
||||
if options.has_key? :node_address
|
||||
query_string = "?nodeaddress=#{options[:node_address]}"
|
||||
else
|
||||
query_string = ''
|
||||
end
|
||||
|
||||
request(
|
||||
:expects => 200,
|
||||
:method => 'GET',
|
||||
:path => 'loadbalancers.json'
|
||||
:path => "loadbalancers.json?#{query_string}"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,6 +30,9 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_tests', ['rackspace'
|
|||
sleep 10
|
||||
end
|
||||
|
||||
tests("#list_load_balancers({:node_address => '10.0.0.1'})").formats(LOAD_BALANCERS_FORMAT) do
|
||||
@service.list_load_balancers({:node_address => '10.0.0.1'}).body
|
||||
end
|
||||
|
||||
tests("#update_load_balancer(#{@lb_id}, { :port => 80 })").succeeds do
|
||||
@service.update_load_balancer(@lb_id, { :port => 80 }).body
|
||||
|
|
Loading…
Reference in a new issue