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

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

Instance Attribute Summary

Attributes inherited from Model

#project

Instance Method Summary collapse

Methods inherited from 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/openstack/key_manager/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/openstack/key_manager/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/openstack/key_manager/models/secret.rb', line 32

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