Class: Fog::KeyManager::OpenStack::Containers

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/key_manager/openstack/models/containers.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

#all(options = {}) ⇒ Object



10
11
12
# File 'lib/fog/key_manager/openstack/models/containers.rb', line 10

def all(options = {})
  load_response(service.list_containers(options), 'containers')
end

#get(secret_ref) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/fog/key_manager/openstack/models/containers.rb', line 14

def get(secret_ref)
  if secret = service.get_container(secret_ref).body
    new(secret)
  end
rescue Fog::Compute::OpenStack::NotFound
  nil
end