Sha256: 85e5ea884bcb4f2fd47ee867bfbe76bde3f4ed466fcbd6aa6aea65e8bf588df1
Contents?: true
Size: 822 Bytes
Versions: 12
Compression:
Stored size: 822 Bytes
Contents
module Fog module Rackspace class LoadBalancers class Real def create_node(load_balancer_id, address, port, condition, options = {}) data = { 'nodes' => [ { 'address' => address, 'port' => port, 'condition' => condition } ]} if options.key?(:weight) data['nodes'][0]['weight'] = options[:weight] end if options.key? :type data['nodes'][0]['type'] = options[:type] end request( :body => Fog::JSON.encode(data), :expects => [200, 202], :method => 'POST', :path => "loadbalancers/#{load_balancer_id}/nodes.json" ) end end end end end
Version data entries
12 entries across 10 versions & 3 rubygems