Skip to content
Browse files

Adds S3_URL to generated ec2rc.sh template.

Fixes bug 987678

Change-Id: I5e4d82b0724a7827fa73625160381bf2df58905b
  • Loading branch information...
1 parent 60f01ef commit 83f66be66f0610493a502b2ae23f21efccbfdf7a @sorrison sorrison committed Apr 24, 2012
View
1 AUTHORS
@@ -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
5 horizon/dashboards/settings/ec2/forms.py
@@ -81,6 +81,11 @@ def find_or_create_access_keys(request, tenant_id):
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
1 horizon/dashboards/settings/templates/settings/ec2/ec2rc.sh.template
@@ -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}"

0 comments on commit 83f66be

Please sign in to comment.
Something went wrong with that request. Please try again.