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

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



29
30
31
32
# File 'lib/fog/key_manager/openstack/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/key_manager/openstack/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/key_manager/openstack/models/container.rb', line 23

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