Module: Fog::OpenStack::Volume::Snapshots

Included in:
V1::Snapshots, V2::Snapshots
Defined in:
lib/fog/openstack/volume/models/snapshots.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



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

def all(options = {})
  load_response(service.list_snapshots_detailed(options), 'snapshots')
end

#get(snapshots_id) ⇒ Object



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

def get(snapshots_id)
  snapshot = service.get_snapshot_details(snapshots_id).body['snapshot']
  if snapshot
    new(snapshot)
  end
rescue Fog::OpenStack::Volume::NotFound
  nil
end

#summary(options = {}) ⇒ Object



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

def summary(options = {})
  load_response(service.list_snapshots(options), 'snapshots')
end