Merge "Use publicURLs for generated endpoints for ec2rc.sh"

This commit is contained in:
Jenkins 2012-05-08 21:22:41 +00:00 committed by Gerrit Code Review
commit cc91a19c0a
1 changed files with 6 additions and 2 deletions

View File

@ -80,9 +80,13 @@ 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')
s3_endpoint = api.url_for(request,
's3',
endpoint_type='publicURL')
except exceptions.ServiceCatalogException:
s3_endpoint = None
context['s3_endpoint'] = s3_endpoint