incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebgoa <run...@gmail.com>
Subject need advice on awsapi docs
Date Wed, 12 Sep 2012 14:19:58 GMT
Hi,

I am working on the new EC2 documentation.
The CloudPlatform doc that I am looking at, as well as other web pages mention the script:
cloudstack-aws-api-register

for instance:
"Register the mapping from the X.509 certificate to the API/Secret keys. Download the following
script from http://download.cloud.com/releases.3.0.3/cloudstack-aws-api-register and run it.
Substitute the values you obtained from the administrator in the URL below."

It's a Python script. The interesting function from the file download on the web is:

def register(url, api_key, secret_key, cert):
    # Register API keys
    query = 'accesskey=' + api_key + '&secretkey=' + secret_key
    get_url(url, api_key, secret_key, 'SetUserKeys', query)

    # Tie Certifcate to API keys
    query = 'cert=' + urllib.quote_plus(cert)
    get_url(url, api_key, secret_key, 'SetCertificate', query)

In the source it's at: awsapi-setup/setup/cloudstack-aws-api.register and the function is:

def register(url, api_key, secret_key, cert):
    # Register API keys
    query = 'accesskey=' + api_key + '&secretkey=' + secret_key
    result = get_url(url, api_key, secret_key, 'SetUserKeys', query)

    if result == True:
            # Tie Certifcate to API keys
            query = 'cert=' + urllib.quote_plus(cert)
            get_url(url, api_key, secret_key, 'SetCertificate', query)

Currently, even if you only want to use the REST interface you will need to register your
cert.

So couple things that I need advice on:

1-Do we make this script available on the web or in source ? If we choose the web (like now),
where should this script be (not on download.cloud.com I presume) ?
	we can't really expect users to download the source of CloudStack to get a single python
script.
2-The register function calls, SetUserKeys and SetCertificate. Does the REST service work
if we do not set the certificate ?


thoughts, 

-Sebastien
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message