Class: Fog::KeyManager::OpenStack::Secret

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/key_manager/openstack/models/secret.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#initialize, #save, #update

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#createObject



38
39
40
41
# File 'lib/fog/key_manager/openstack/models/secret.rb', line 38

def create
  merge_attributes(service.create_secret(attributes).body)
  self
end

#destroyObject



43
44
45
46
47
# File 'lib/fog/key_manager/openstack/models/secret.rb', line 43

def destroy
  requires :secret_ref
  service.delete_secret(uuid)
  true
end

#uuidObject



32
33
34
35
36
# File 'lib/fog/key_manager/openstack/models/secret.rb', line 32

def uuid
  URI(self.secret_ref).path.split('/').last
rescue
  nil
end