Class: Fog::Volume::OpenStack::Backup
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save, #update
Instance Method Details
#create ⇒ Object
20
21
22
23
24
25
|
# File 'lib/fog/volume/openstack/models/backup.rb', line 20
def create
requires :name, :volume_id
data = service.create_backup(attributes)
merge_attributes(data.body['backup'])
true
end
|
#destroy ⇒ Object
27
28
29
30
31
|
# File 'lib/fog/volume/openstack/models/backup.rb', line 27
def destroy
requires :id
service.delete_backup(id)
true
end
|
#restore(volume_id) ⇒ Object
33
34
35
36
37
|
# File 'lib/fog/volume/openstack/models/backup.rb', line 33
def restore(volume_id)
requires :id
service.restore_backup(id, volume_id)
true
end
|
#volume ⇒ Object
39
40
41
42
|
# File 'lib/fog/volume/openstack/models/backup.rb', line 39
def volume
requires :id
service.get_volume_details(volume_id).body['volume']
end
|