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