Use publicURLs for generated endpoints for ec2rc.sh
Fixes bug 994297 Change-Id: Icbc0b3ca327d87754bac291b0d179faacdabc7aa
This commit is contained in:
parent
8f1ea73606
commit
83647436f7
1
AUTHORS
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>
|
||||
|
@ -80,7 +80,16 @@ class DownloadX509Credentials(forms.SelfHandlingForm):
|
||||
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.'),
|
||||
|
Loading…
Reference in New Issue
Block a user