lib/fog/compute/google/models/disk.rb in fog-google-1.6.0 vs lib/fog/compute/google/models/disk.rb in fog-google-1.7.0
- old
+ new
@@ -48,11 +48,11 @@
# Request needs backward compatibility so source image is specified in
# method arguments
data = service.insert_disk(name, zone, options[:source_image], options)
operation = Fog::Compute::Google::Operations.new(:service => service)
.get(data.name, data.zone)
- operation.wait_for { !pending? }
+ operation.wait_for { ready? }
reload
end
def destroy(async = true)
requires :name, :zone
@@ -106,10 +106,10 @@
raise ArgumentError, "Invalid snapshot name" unless snapshot_name
data = service.create_disk_snapshot(snapshot_name, name, zone_name, snapshot)
operation = Fog::Compute::Google::Operations.new(:service => service)
.get(data.name, data.zone)
- operation.wait_for { !pending? }
+ operation.wait_for { ready? }
service.snapshots.get(snapshot_name)
end
RUNNING_STATE = "READY".freeze
end