Created
May 31, 2011 16:53
-
-
Save seungjin/1000869 to your computer and use it in GitHub Desktop.
accessing eucalyptus with boto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto | |
| from boto.ec2.connection import EC2Connection | |
| from boto.ec2.regioninfo import RegionInfo | |
| region = RegionInfo(name="eucalyptus", endpoint=hostname) | |
| #conn = EC2Connection('<aws access key>', '<aws secret key>') | |
| connection = boto.connect_ec2(aws_access_key_id=access_key, | |
| aws_secret_access_key=secret_key, | |
| is_secure=False, | |
| region=region, | |
| port=8773, | |
| path="/services/Eucalyptus") | |
| #Run command | |
| images = connection.get_all_images() | |
| print images | |
| instances_reservations = connection.get_all_instances() | |
| print instances_reservations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment