Skip to content

Instantly share code, notes, and snippets.

@richo
Created October 12, 2012 00:04
Show Gist options
  • Save richo/3876514 to your computer and use it in GitHub Desktop.
Save richo/3876514 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
require 'fog'
$access_key=""
$secret_key=""
def connection
@connection ||= Fog::Compute.new({
:provider => 'AWS',
:aws_access_key_id => $access_key,
:aws_secret_access_key => $secret_key
})
end
puts "describe_instances"
puts connection.describe_instances.body["reservationSet"].count
puts "servers"
puts connection.servers.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment