Sha256: aebb4817913c32d6fe54aa69e008e9f925d4c81a5e58902cc1b5bafd7257704b
Contents?: true
Size: 537 Bytes
Versions: 3
Compression:
Stored size: 537 Bytes
Contents
require 'AWS' class Ec2Tools::EC2 < AWS::EC2::Base def initialize(config) @config = config end def servers unless @servers @servers = {} describe_instances.reservationSet.item.each do |reservation| reservation.instanceSet.item.each do |instance| if instance.instanceState.name == "running" key = instnacekeyName.to_sym @servers[key] = [] if @servers[key].nil? @servers[key] << instance end end end end @servers end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ec2_tools-0.2.1 | lib/ec2_tools/ec2.rb |
ec2_tools-0.2.0 | lib/ec2_tools/ec2.rb |
ec2_tools-0.1.0 | lib/ec2_tools/ec2.rb |