Class: Fog::Compute::Google::InstanceGroupManager
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Google::InstanceGroupManager
- Defined in:
- lib/fog/compute/google/models/instance_group_manager.rb
Instance Method Summary collapse
- #abandon_instances(instances) ⇒ Object
- #destroy(async = true) ⇒ Object
- #recreate_instances(instances) ⇒ Object
- #save ⇒ Object
- #set_instance_template(instance_template) ⇒ Object
Instance Method Details
#abandon_instances(instances) ⇒ Object
45 46 47 |
# File 'lib/fog/compute/google/models/instance_group_manager.rb', line 45 def abandon_instances(instances) service.abandon_instances self, instances end |
#destroy(async = true) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/fog/compute/google/models/instance_group_manager.rb', line 30 def destroy(async = true) requires :name, :zone operation = service.delete_instance_group_manager(name, zone.split("/")[-1]) operation.wait_for { ready? } unless async operation end |
#recreate_instances(instances) ⇒ Object
41 42 43 |
# File 'lib/fog/compute/google/models/instance_group_manager.rb', line 41 def recreate_instances(instances) service.recreate_instances self, instances end |
#save ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/fog/compute/google/models/instance_group_manager.rb', line 20 def save requires :name, :zone, :base_instance_name, :target_size, :instance_template data = service.insert_instance_group_manager(name, zone.split("/")[-1], instance_template, base_instance_name, target_size, target_pools, named_ports, description) operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name, zone.split("/")[-1]) operation.wait_for { ready? } reload end |
#set_instance_template(instance_template) ⇒ Object
37 38 39 |
# File 'lib/fog/compute/google/models/instance_group_manager.rb', line 37 def set_instance_template(instance_template) service.set_instance_template self, instance_template end |