Module: Fog::Volume::OpenStack::Backups

Included in:
V1::Backups, V2::Backups
Defined in:
lib/fog/volume/openstack/models/backups.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object


7
8
9
# File 'lib/fog/volume/openstack/models/backups.rb', line 7

def all(options = {})
  load_response(service.list_backups_detailed(options), 'backups')
end

#get(backup_id) ⇒ Object


15
16
17
18
19
20
21
22
# File 'lib/fog/volume/openstack/models/backups.rb', line 15

def get(backup_id)
  backup = service.get_backup_details(backup_id).body['backup']
  if backup
    new(backup)
  end
rescue Fog::Volume::OpenStack::NotFound
  nil
end

#summary(options = {}) ⇒ Object


11
12
13
# File 'lib/fog/volume/openstack/models/backups.rb', line 11

def summary(options = {})
  load_response(service.list_backups(options), 'backups')
end