Sha256: 5204012d002cbf1ab0f649f95769f944b4528810b6c824758413c7560f42cf13
Contents?: true
Size: 828 Bytes
Versions: 12
Compression:
Stored size: 828 Bytes
Contents
module Fog module Rackspace class LoadBalancers class Real def create_load_balancer(name, protocol, port, virtual_ips, nodes, options = {}) data = { 'loadBalancer' => { 'name' => name, 'port' => port, 'protocol' => protocol, 'virtualIps' => virtual_ips, 'nodes' => nodes } } data['loadBalancer']['algorithm'] = options[:algorithm] if options.has_key? :algorithm data['loadBalancer']['timeout'] = options[:timeout] if options.has_key? :timeout request( :body => Fog::JSON.encode(data), :expects => 202, :method => 'POST', :path => 'loadbalancers.json' ) end end end end end
Version data entries
12 entries across 12 versions & 3 rubygems