Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Installation: Use any of the following to install boto,
    1. sudo apt-get install python-boto
    2. pip install --U boto
    3. git clone https://github.com/boto/boto.git; cd boto; sudo python setup.py install
  2. Configuration: Edit /etc/boto.cfg or ~/.boto to add,
    Code Block
    borderStyledashed
    [Credentials]
    aws_access_key_id= <cloudstack_api_key>
    aws_secret_access_key=  <cloudstack_secret_key>
    Wiki Markup
    For more details on Boto configuration refer&nbsp;\[1\]
  3. Connection: Make EC2 service connection against CloudStack management server. Use the connection to make any EC2 API call,
    Sample python code that uses Boto client to make EC2 DescribeImages API call against CloudStack,
    Code Block
    borderStyledashed
    import boto
    import boto.ec2
    
    region = boto.ec2.regioninfo.RegionInfo(name="AmazonEC2", endpoint="<cloudstack_management_server_ip>")
    conn = boto.connect_ec2(aws_access_key_id="<cloudstack_api_key>", aws_secret_access_key="<cloudstack_secret_key>", is_secure=False, region=region, port=7080, path="/awsapi", api_version="2012-08-15")
    
    # list images
    images = conn.get_all_images()
    
    # list attributes of the first image
    dir(images[0])
    
    # list attribute values of the first image
    vars(images[0])
    Wiki Markup
    For a complete list offof Boto EC2 commands refer&nbsp;[^EC2_API calls refer _vs_Boto_commands.xlsx]. For details on each of the commands refer&nbsp;\[2\].

Wiki Markup
*\[B\] Java SDK{*}

...