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:
parent
2285082bde
commit
a1f505151a
1 changed files with 21 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue