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

create lb node request logic

This commit is contained in:
Mike Hagedorn 2013-03-05 10:08:30 -06:00 committed by Rupak Ganguly
parent 2285082bde
commit a1f505151a

View file

@ -3,7 +3,28 @@ module Fog
class BlockStorage
class LB
class Real
#example node...
#{
# "address" : "10.2.2.2",
# "port" : "88",
# "condition" : "DISABLED"
#}
def create_load_balancer_node(load_balancer_id,options={})
data = {}
if options['nodes']
data['nodes'] = []
for node in options['nodes']
data['nodes'] << node
end
end
response = request(
:body => Fog::JSON.encode(data),
:expects => 202,
:method => 'POST',
:path => "loadbalancers/#{load_balancer_id}/nodes"
)
end
end
@ -13,7 +34,6 @@ module Fog
response
end
end
end