Adds S3_URL to generated ec2rc.sh template.

Fixes bug 987678

Change-Id: I5e4d82b0724a7827fa73625160381bf2df58905b
This commit is contained in:
Sam Morrison 2012-04-24 18:08:08 +10:00
parent 60f01efd6e
commit 83f66be66f
3 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,7 @@ Mike Scherbakov <mihgen@gmail.com>
Monty Taylor <mordred@inaugust.com>
Neil Johnston <onewheeldrive.net@gmail.com>
Paul McMillan <paul.mcmillan@nebula.com>
Sam Morrison <sorrison@gmail.com>
Stephane Angot <sa@hydre.org>
termie <github@anarkystic.com>
Thierry Carrez <thierry@openstack.org>

View File

@ -81,6 +81,11 @@ class DownloadX509Credentials(forms.SelfHandlingForm):
context = {'ec2_access_key': keys.access,
'ec2_secret_key': keys.secret,
'ec2_endpoint': api.url_for(request, 'ec2')}
try:
s3_endpoint = api.url_for(request, 's3')
except exceptions.ServiceCatalogException:
s3_endpoint = None
context['s3_endpoint'] = s3_endpoint
except:
exceptions.handle(request,
_('Unable to fetch EC2 credentials.'),

View File

@ -10,5 +10,6 @@ export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
{% if s3_endpoint %}export S3_URL={{ s3_endpoint }}{% endif %}
alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"