Represents an Address resource
@see developers.google.com/compute/docs/reference/latest/addresses
# File lib/fog/google/models/compute/address.rb, line 46 def destroy(async=true) requires :identity, :region data = service.delete_address(identity, self.region.split('/')[-1]) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'], nil, data.body['region']) unless async operation.wait_for { ready? } end operation end
# File lib/fog/google/models/compute/address.rb, line 65 def in_use? self.status == IN_USE_STATE end
# File lib/fog/google/models/compute/address.rb, line 57 def reload requires :identity, :region data = collection.get(identity, self.region.split('/')[-1]) merge_attributes(data.attributes) self end
# File lib/fog/google/models/compute/address.rb, line 37 def save requires :identity, :region data = service.insert_address(identity, self.region, self.attributes) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'], nil, data.body['region']) operation.wait_for { !pending? } reload end
Generated with the Darkfish Rdoc Generator 2.