From c41dcc9f4366429d952cc47853496d58d47b7511 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Wed, 22 Jul 2015 11:41:42 +0200 Subject: Fix failure to create glance https connection pool Due to a typo in an attribute named, an Attribute error is raised causing failure in connection to glance through HTTPS Urllib3 PoolManager class has a connection_pool_kw attribute but not connection_kw Closes-Bug: #1479020 Change-Id: Id4d6a5bdcf971d09e80043fd2ab399e208fd931c --- glanceclient/common/https.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'glanceclient/common/https.py') diff --git a/glanceclient/common/https.py b/glanceclient/common/https.py index 30896e0..56ee0cd 100644 --- a/glanceclient/common/https.py +++ b/glanceclient/common/https.py @@ -162,15 +162,16 @@ class HTTPSAdapter(adapters.HTTPAdapter): return url def _create_glance_httpsconnectionpool(self, url): - kw = self.poolmanager.connection_kw + kw = self.poolmanager.connection_pool_kw # Parse the url to get the scheme, host, and port parsed = compat.urlparse(url) # If there is no port specified, we should use the standard HTTPS port port = parsed.port or 443 - pool = HTTPSConnectionPool(parsed.host, port, **kw) + host = parsed.netloc.rsplit(':', 1)[0] + pool = HTTPSConnectionPool(host, port, **kw) with self.poolmanager.pools.lock: - self.poolmanager.pools[(parsed.scheme, parsed.host, port)] = pool + self.poolmanager.pools[(parsed.scheme, host, port)] = pool return pool -- cgit v1.2.1