Class: Fog::KeyManager::OpenStack::Secrets

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/key_manager/openstack/models/secrets.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/secrets.rb', line 10

def all(options = {})
  load_response(service.list_secrets(options), 'secrets')
end

#get(secret_ref) ⇒ Object



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

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