mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
30 lines
756 B
Ruby
30 lines
756 B
Ruby
module Fog
|
|
module Rackspace
|
|
class LoadBalancer
|
|
class Real
|
|
def create_load_balancer(options = {})
|
|
data = {
|
|
'loadBalancer' => {
|
|
'name' => options[:name],
|
|
'port' => options[:port],
|
|
'protocol' => options[:protocol],
|
|
'virtualIps' => options[:virtualIps],
|
|
'nodes' => options[:nodes]
|
|
}
|
|
}
|
|
request(
|
|
:body => data.to_json,
|
|
:expects => 202,
|
|
:method => 'POST',
|
|
:path => 'loadbalancers.json'
|
|
)
|
|
end
|
|
end
|
|
class Mock
|
|
def create_load_balancer(options = {})
|
|
Fog::Mock.not_implemented
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|