Sha256: 57f30a40c2ca309476337a4a10d065d819fab14dfff3d09a273728bd9b7b4621

Contents?: true

Size: 386 Bytes

Versions: 1

Compression:

Stored size: 386 Bytes

Contents

class AWS::EC2::InstanceCollection
  def wait_for_status(status, interval = 1, collection = self)
    until collection.all? { |ec2| ec2.status == status } 
      puts "Waiting for ALL instances to be #{status}..."
      collection.each { |ec2| print_status(ec2) }
      sleep interval
    end

    collection
  end

  def print_status(ec2)
    puts "#{ec2.id}\t#{ec2.status}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rodeo_clown-0.1.0 lib/rodeo_clown/ext/aws/ec2/instance_collection.rb