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

add :type to RS LoadBalancers nodes

This commit is contained in:
Chris McClimans 2014-11-05 15:33:17 -08:00
parent 7d0d7c01ae
commit e4fe6038e6
3 changed files with 13 additions and 0 deletions

View file

@ -10,6 +10,7 @@ module Fog
attribute :status
attribute :weight
attribute :port
attribute :type
attribute :condition
def destroy
@ -38,6 +39,9 @@ module Fog
unless weight.nil?
options[:weight] = weight
end
unless type.nil?
options[:type] = type
end
data = service.create_node(load_balancer.id, address, port, condition, options)
merge_attributes(data.body['nodes'][0])
end
@ -50,6 +54,9 @@ module Fog
unless weight.nil?
options[:weight] = weight
end
unless type.nil?
options[:type] = type
end
service.update_node(load_balancer.id, identity, options)
end
end

View file

@ -14,6 +14,9 @@ module Fog
if options.key?(:weight)
data['nodes'][0]['weight'] = options[:weight]
end
if options.key? :type
data['node']['type'] = options[:type]
end
request(
:body => Fog::JSON.encode(data),
:expects => [200, 202],

View file

@ -12,6 +12,9 @@ module Fog
if options.key? :condition
data['node']['condition'] = options[:condition]
end
if options.key? :type
data['node']['type'] = options[:type]
end
#TODO - Do anything if no valid options are passed in?
request(
:body => Fog::JSON.encode(data),