Fix keystone.py 'get_service_url' method parameter
Calls to 'get_service_url' should use the 'region_name' parameter. Before they were incorrectly using 'region' as the parameter name. Change-Id: Ic839ba6dbd5ca4dc9c7d87cf23582b8cfc393731 Closes-Bug: #1687866
This commit is contained in:
parent
39b797faf1
commit
21d89c0f64
@ -128,7 +128,7 @@ def get_service_url(session, service_type='baremetal',
|
||||
"""
|
||||
return session.get_endpoint(service_type=service_type,
|
||||
interface=endpoint_type,
|
||||
region=CONF.keystone.region_name)
|
||||
region_name=CONF.keystone.region_name)
|
||||
|
||||
|
||||
@ks_exceptions
|
||||
|
@ -57,7 +57,7 @@ class KeystoneTestCase(base.TestCase):
|
||||
mock_sess.get_endpoint.return_value = fake_url
|
||||
res = keystone.get_service_url(mock_sess)
|
||||
mock_sess.get_endpoint.assert_called_with(
|
||||
interface='internal', region='fake_region',
|
||||
interface='internal', region_name='fake_region',
|
||||
service_type='baremetal')
|
||||
self.assertEqual(fake_url, res)
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixes multi-region issue when region specified in config file
|
||||
was ignored when getting keystone service url.
|
Loading…
Reference in New Issue
Block a user