1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

add existing ec2 stuff to bin/fog

This commit is contained in:
Wesley Beary 2009-10-07 23:45:33 -07:00
parent 909a648b53
commit 4bab2f4e7a

25
bin/fog
View file

@ -9,15 +9,40 @@ elsif File.exists?(File.expand_path('~/.fog'))
@credentials = YAML.load(File.open(File.expand_path('~/.fog')).read)
end
@ec2 = Fog::AWS::EC2.new(
:aws_access_key_id => @credentials['aws_access_key_id'],
:aws_secret_access_key => @credentials['aws_secret_access_key']
)
@s3 = Fog::AWS::S3.new(
:aws_access_key_id => @credentials['aws_access_key_id'],
:aws_secret_access_key => @credentials['aws_secret_access_key']
)
def addresses
@ec2.addresses
end
def buckets
@s3.buckets
end
def key_pairs
@ec2.key_pairs
end
def security_groups
@ec2.security_groups
end
def snapshots
@ec2.snapshots
end
def volumes
@ec2.volumes
end
ARGV.clear # Avoid passing args to IRB
IRB.setup(nil)
@irb = IRB::Irb.new(nil)