Class: Fog::Compute::Google::Firewall
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Google::Firewall
- Defined in:
- lib/fog/google/models/compute/firewall.rb
Overview
Represents a Firewall resource
Instance Method Summary collapse
Instance Method Details
#destroy(async = true) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fog/google/models/compute/firewall.rb', line 33 def destroy(async=true) requires :identity data = service.delete_firewall(identity) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name']) unless async operation.wait_for { ready? } end operation end |
#save ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/fog/google/models/compute/firewall.rb', line 24 def save requires :identity, :allowed, :network data = service.insert_firewall(identity, self.allowed, self.network, self.attributes) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name']) operation.wait_for { !pending? } reload end |