Class: Slugforge::Ec2InstanceGroup
- Defined in:
- lib/slugforge/models/host_group/ec2_instance_group.rb
Instance Attribute Summary
Attributes inherited from HostGroup
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pattern, compute) ⇒ Ec2InstanceGroup
constructor
A new instance of Ec2InstanceGroup.
Methods inherited from HostGroup
detect, discover, #hosts_for_action, #install_all, #install_number_of_hosts, #install_percent_of_hosts, #sorted_hosts, #success?
Constructor Details
#initialize(pattern, compute) ⇒ Ec2InstanceGroup
Returns a new instance of Ec2InstanceGroup.
11 12 13 14 15 16 17 18 19 |
# File 'lib/slugforge/models/host_group/ec2_instance_group.rb', line 11 def initialize(pattern, compute) server = compute.servers.get(pattern) @hosts = if server.nil? || server.public_ip_address.nil? [] else [ FogHost.new(pattern, server) ] end super end |
Class Method Details
.matcher ⇒ Object
7 8 9 |
# File 'lib/slugforge/models/host_group/ec2_instance_group.rb', line 7 def self.matcher /^i-[0-9a-f]{8}$/i end |