Class: Fog::OpenStack::KeyManager::Container

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/openstack/key_manager/models/container.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



29
30
31
32
# File 'lib/fog/openstack/key_manager/models/container.rb', line 29

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

#destroyObject



34
35
36
37
38
# File 'lib/fog/openstack/key_manager/models/container.rb', line 34

def destroy
  requires :container_ref
  service.delete_container(uuid)
  true
end

#uuidObject



23
24
25
26
27
# File 'lib/fog/openstack/key_manager/models/container.rb', line 23

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