Class: Fog::Compute::Gridscale::Snapshots
Instance Method Summary
collapse
#next_page, #previous_page
Instance Method Details
#all(filters = {}) ⇒ Object
9
10
11
12
13
|
# File 'lib/fog/compute/gridscale/models/snapshots.rb', line 9
def all(filters={})
data = service.snapshots_get(filters)
snapshots = data.body["snapshots"].values
load(snapshots)
end
|
#get(payload) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/fog/compute/gridscale/models/snapshots.rb', line 15
def get(payload)
snapshot = service.snapshot_get(payload).body['snapshot']
new(snapshot) if snapshot
rescue Fog::Errors::NotFound
nil
end
|