client HTTPClient __init__ fails if auth_url None
The initializer for the python-cinderclient HTTPClient class fails if passed a None for an auth_url. This patch modifies the inializer to not call rstrip if auth_url is None, matching the initalizers in python-novaclient and python-neutronclient Change-Id: I19dd6911816639a0e0d6175ba910e9777a4b5981 Closes-bug: #1358926
This commit is contained in:
parent
9bd8c5dff9
commit
f7d391e5cb
cinderclient
@ -159,7 +159,7 @@ class HTTPClient(object):
|
|||||||
if not auth_url:
|
if not auth_url:
|
||||||
raise exceptions.EndpointNotFound()
|
raise exceptions.EndpointNotFound()
|
||||||
|
|
||||||
self.auth_url = auth_url.rstrip('/')
|
self.auth_url = auth_url.rstrip('/') if auth_url else None
|
||||||
self.version = 'v1'
|
self.version = 'v1'
|
||||||
self.region_name = region_name
|
self.region_name = region_name
|
||||||
self.endpoint_type = endpoint_type
|
self.endpoint_type = endpoint_type
|
||||||
|
@ -198,6 +198,10 @@ class ClientTest(utils.TestCase):
|
|||||||
test_get_call()
|
test_get_call()
|
||||||
self.assertEqual([], self.requests)
|
self.assertEqual([], self.requests)
|
||||||
|
|
||||||
|
def test_get_no_auth_url(self):
|
||||||
|
client.HTTPClient("username", "password",
|
||||||
|
"project_id", retries=0)
|
||||||
|
|
||||||
def test_post(self):
|
def test_post(self):
|
||||||
cl = get_authed_client()
|
cl = get_authed_client()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user