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/compute/google/models/snapshot.rb, line 25
def destroy(async = true)
  requires :identity

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