Sha256: e3b76bb54ed35d6f96a029d92d6391e0f8d6e8f52b21ca9dfded9ca88edb6873

Contents?: true

Size: 531 Bytes

Versions: 23

Compression:

Stored size: 531 Bytes

Contents

require 'fog'

module Stackster
  class AWS
    class EC2

      def initialize(args)
        c = args[:config]
        @connect = Fog::Compute::AWS.new :aws_access_key_id => c.access_key,
                                     :aws_secret_access_key => c.secret_key,
                                     :region => c.region
      end

      def describe_instances
        i = []
        @connect.describe_instances.body['reservationSet'].each do |instance|
          i << instance
        end
        i
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
stackster-0.4.2 lib/stackster/aws/ec2.rb
stackster-0.4.1 lib/stackster/aws/ec2.rb
stackster-0.4.0 lib/stackster/aws/ec2.rb
stackster-0.3.2 lib/stackster/aws/ec2.rb
stackster-0.3.1 lib/stackster/aws/ec2.rb
stackster-0.3.0 lib/stackster/aws/ec2.rb
stackster-0.2.9 lib/stackster/aws/ec2.rb
stackster-0.2.8 lib/stackster/aws/ec2.rb
stackster-0.2.7 lib/stackster/aws/ec2.rb
stackster-0.2.6 lib/stackster/aws/ec2.rb
stackster-0.2.5 lib/stackster/aws/ec2.rb
stackster-0.2.4 lib/stackster/aws/ec2.rb
stackster-0.2.3 lib/stackster/aws/ec2.rb
stackster-0.2.2 lib/stackster/aws/ec2.rb
stackster-0.2.1 lib/stackster/aws/ec2.rb
stackster-0.2.0 lib/stackster/aws/ec2.rb
stackster-0.1.3 lib/stackster/aws/ec2.rb
stackster-0.1.2 lib/stackster/aws/ec2.rb
stackster-0.1.1 lib/stackster/aws/ec2.rb
stackster-0.1.0 lib/stackster/aws/ec2.rb