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

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/openstack/key_manager/models/containers.rb

Instance Attribute Summary

Attributes inherited from Collection

#response

Instance Method Summary collapse

Methods inherited from Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#all(options = {}) ⇒ Object



10
11
12
# File 'lib/fog/openstack/key_manager/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/openstack/key_manager/models/containers.rb', line 14

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