class Fog::Compute::Google::Snapshot

Constants

CREATING_STATE
DELETING_STATE
FAILED_STATE
READY_STATE
UPLOADING_STATE

Public Instance Methods

destroy(async=true) click to toggle source
# File lib/fog/google/models/compute/snapshot.rb, line 27
def destroy(async=true)
  requires :identity

  data = service.delete_snapshot(identity)
  operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'])
  unless async
    operation.wait_for { ready? }
  end
  operation
end
ready?() click to toggle source
# File lib/fog/google/models/compute/snapshot.rb, line 38
def ready?
  self.status == READY_STATE
end
resource_url() click to toggle source
# File lib/fog/google/models/compute/snapshot.rb, line 42
def resource_url
  "#{self.service.project}/global/snapshots/#{name}"
end