From 7670ce095a7da2c762dc269ce886d786b2662532 Mon Sep 17 00:00:00 2001 From: Paulo Matias Date: Thu, 5 Jan 2017 17:26:05 -0200 Subject: [PATCH] Always pass the public endpoint to the client Even if Horizon is configured to use internal endpoints for requests made by its server side to other OpenStack services, the client side should not be restricted to run only in networks which have access to the internal endpoints. Change-Id: Ibdc663a133670e8f07530c0d7c5ed7df2d92b99b Closes-Bug: #1639080 (cherry picked from commit 446e5aefb4354c9092d1cbc5ff258ee74558e769) --- openstack_dashboard/api/glance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack_dashboard/api/glance.py b/openstack_dashboard/api/glance.py index ce34baacf..9efee0460 100644 --- a/openstack_dashboard/api/glance.py +++ b/openstack_dashboard/api/glance.py @@ -371,7 +371,7 @@ def get_image_upload_mode(): class ExternallyUploadedImage(Image): def __init__(self, apiresource, request): super(ExternallyUploadedImage, self).__init__(apiresource) - image_endpoint = base.url_for(request, 'image') + image_endpoint = base.url_for(request, 'image', 'publicURL') if VERSIONS.active >= 2: upload_template = "%s/v2/images/%s/file" else: