Class: Fog::Bluebox::BLB::LbBackends

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/bluebox/models/blb/lb_backends.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lb_serviceObject

Returns the value of attribute lb_service


10
11
12
# File 'lib/fog/bluebox/models/blb/lb_backends.rb', line 10

def lb_service
  @lb_service
end

Instance Method Details

#allObject


12
13
14
15
# File 'lib/fog/bluebox/models/blb/lb_backends.rb', line 12

def all
  data = service.get_lb_backends(lb_service.id).body
  load(data)
end

#get(lb_backend_id) ⇒ Object


17
18
19
20
21
22
23
# File 'lib/fog/bluebox/models/blb/lb_backends.rb', line 17

def get(lb_backend_id)
  if lb_backend = service.get_lb_backend(lb_service.id, lb_backend_id).body
    new(lb_backend)
  end
rescue Fog::Compute::Bluebox::NotFound
  nil
end