Class: Fog::ContainerInfra::OpenStack::Bays

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/container_infra/openstack/models/bays.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/container_infra/openstack/models/bays.rb', line 10

def all
  load_response(service.list_bays, "bays")
end

#get(bay_uuid_or_name) ⇒ Object



14
15
16
17
18
19
# File 'lib/fog/container_infra/openstack/models/bays.rb', line 14

def get(bay_uuid_or_name)
  resource = service.get_bay(bay_uuid_or_name).body
  new(resource)
rescue Fog::ContainerInfra::OpenStack::NotFound
  nil
end