Skip to content

Commit

Permalink
Use publicURLs for generated endpoints for ec2rc.sh
Browse files Browse the repository at this point in the history
Fixes bug 994297

Change-Id: Icbc0b3ca327d87754bac291b0d179faacdabc7aa
  • Loading branch information
sorrison authored and markmc committed Jun 21, 2012
1 parent 8f1ea73 commit 8364743
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -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>
Expand Down
11 changes: 10 additions & 1 deletion horizon/dashboards/settings/ec2/forms.py
Expand Up @@ -80,7 +80,16 @@ def find_or_create_access_keys(request, tenant_id):
keys = find_or_create_access_keys(request, data.get('tenant'))
context = {'ec2_access_key': keys.access,
'ec2_secret_key': keys.secret,
'ec2_endpoint': api.url_for(request, 'ec2')}
'ec2_endpoint': api.url_for(request,
'ec2',
endpoint_type='publicURL')}
try:
s3_endpoint = api.url_for(request,
's3',
endpoint_type='publicURL')
except exceptions.ServiceCatalogException:
s3_endpoint = None
context['s3_endpoint'] = s3_endpoint
except:
exceptions.handle(request,
_('Unable to fetch EC2 credentials.'),
Expand Down

0 comments on commit 8364743

Please sign in to comment.