diff --git a/AUTHORS b/AUTHORS index 1299a80ac2..22400c1932 100644 --- a/AUTHORS +++ b/AUTHORS @@ -38,6 +38,7 @@ Mike Scherbakov Monty Taylor Neil Johnston Paul McMillan +Sam Morrison Stephane Angot termie Thierry Carrez diff --git a/horizon/dashboards/settings/ec2/forms.py b/horizon/dashboards/settings/ec2/forms.py index 4c643d2a73..1105aa6241 100644 --- a/horizon/dashboards/settings/ec2/forms.py +++ b/horizon/dashboards/settings/ec2/forms.py @@ -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.'),