An interesting tool based on Boto is Eutester it was created by the folks at Eucalyptus to provide a framework to create functional tests for AWS zones and Eucalyptus based clouds. What is interesting with
eutester is that it could be used to compare the AWS compatibility of multiple clouds. Therefore the interesting question that you are going to ask is: Can we use Eutester with CloudStack ? And the answer is Yes. Certainly it could use more work but the basic functionality is there.
pip install eutester
Then start Python/iPython interactive shell or write a script that will import
ec2ops and create a connection object to your AWS EC2 compatible endpoint. For example, using ec2stack:
from eucaops import ec2ops
from IPython.terminal.embed import InteractiveShellEmbed
accesskey="my api key"
secretkey="my secret key"
ipshell = InteractiveShellEmbed(banner1="Hello Cloud Shell !!")
Eutester at the time of this writing has 145 methods. Only the methods available through the CloudStack AWS EC2 interface will be availble. For example,
get_instances would return:
In : conn.get_zones()
In : conn.get_instances()
[2014-05-21 05:39:45,094] [EUTESTER] [DEBUG]:
--->(ec2ops.py:3164)Starting method: get_instances(self, state=None,
idstring=None, reservation=None, rootdevtype=None, zone=None,
key=None, pubip=None, privip=None, ramdisk=None, kernel=None,
This example shows that I am running eight instances at the moment in a zone called ch-gva-2, our familiar exoscale. Selecting one of these instance objects will give you access to all the methods available for instances. You could also list, delete and create keypairs. List, delete and create security groups etc.