add example of non-cli connection creation to README

This commit is contained in:
geemus 2010-11-17 11:40:38 -08:00
parent 04893cf1b5
commit 432361b33b
1 changed files with 11 additions and 1 deletions

View File

@ -97,7 +97,17 @@ It will return an {excon}[http://github.com/geemus/excon] response, which has #h
== Go forth and conquer
Play around and use the console to explore or check out the {getting started guide}[http://wiki.github.com/geemus/fog/getting-started-with-fog] for more details.
Play around and use the console to explore or check out the {getting started guide}[http://wiki.github.com/geemus/fog/getting-started-with-fog] for more details. Once you are reading to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.
# create a compute connection
compute = Fog::Compute.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
# compute operations go here
# create a storage connection
storage = Fog::Storage.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
# storage operations go here
geemus says: "That should give you everything you need to get started, but let me know if there is anything I can do to help!"
You should try out the (varying) support fog has for:
* {AWS}[http://aws.amazon.com] [{Compute}[http://aws.amazon.com/ec2], {ELB}[http://aws.amazon.com/elasticloadbalancing], {Storage}[http://aws.amazon.com/s3], {SimpleDB}[http://aws.amazon.com/simpledb]]