class Fog::Compute::Google::Snapshots

Public Instance Methods

all() click to toggle source
# File lib/fog/compute/google/models/snapshots.rb, line 7
def all
  data = service.list_snapshots
  snapshots = data.body["items"] || []
  load(snapshots)
end
get(snap_id) click to toggle source
# File lib/fog/compute/google/models/snapshots.rb, line 13
def get(snap_id)
  response = service.get_snapshot(snap_id)
  return nil if response.nil?
  new(response.body)
rescue Fog::Errors::NotFound
  nil
end