Class: Fog::OpenStack::Compute::Snapshot
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Compute::Snapshot
show all
- Defined in:
- lib/fog/openstack/compute/models/snapshot.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#create, #initialize, #update
Instance Method Details
#destroy ⇒ Object
24
25
26
27
28
|
# File 'lib/fog/openstack/compute/models/snapshot.rb', line 24
def destroy
requires :id
service.delete_snapshot(id)
true
end
|
#save(force = false) ⇒ Object
17
18
19
20
21
22
|
# File 'lib/fog/openstack/compute/models/snapshot.rb', line 17
def save(force = false)
requires :volume_id, :name, :description
data = service.create_snapshot(volume_id, name, description, force)
merge_attributes(data.body['snapshot'])
true
end
|