Class: Fog::OpenStack::KeyManager::Container
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::KeyManager::Container
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
Instance Method Details
#create ⇒ Object
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
|
#destroy ⇒ Object
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
|
#uuid ⇒ Object
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
|