Class: Fog::Compute::Google::Route
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Google::Route
- Defined in:
- lib/fog/google/models/compute/route.rb
Overview
Represents a Route resource
Instance Method Summary collapse
Instance Method Details
#destroy(async = true) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fog/google/models/compute/route.rb', line 38 def destroy(async=true) requires :identity data = service.delete_route(identity) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name']) unless async operation.wait_for { ready? } end operation end |
#save ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/fog/google/models/compute/route.rb', line 29 def save requires :identity, :network, :dest_range, :priority data = service.insert_route(identity, self.network, self.dest_range, self.priority, self.attributes) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name']) operation.wait_for { !pending? } reload end |