2010-12-03 09:54:50 -05:00
|
|
|
require 'fog/core/collection'
|
2011-08-24 21:31:12 -04:00
|
|
|
require 'fog/brightbox/models/compute/load_balancer'
|
2010-12-03 09:54:50 -05:00
|
|
|
|
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Brightbox
|
2010-12-03 09:54:50 -05:00
|
|
|
|
|
|
|
class LoadBalancers < Fog::Collection
|
|
|
|
|
2011-06-16 19:28:54 -04:00
|
|
|
model Fog::Compute::Brightbox::LoadBalancer
|
2010-12-03 09:54:50 -05:00
|
|
|
|
|
|
|
def all
|
|
|
|
data = connection.list_load_balancers
|
|
|
|
load(data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def get(identifier)
|
|
|
|
data = connection.get_load_balancer(identifier)
|
|
|
|
new(data)
|
|
|
|
rescue Excon::Errors::NotFound
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|