Update auth_uri option to www_authenticate_uri

Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.

[1]https://review.openstack.org/#/c/508522/

Change-Id: I2ef330d7f9b632e9a81d22a8edec3c88eb532ff5
This commit is contained in:
caoyuan 2018-04-08 15:17:57 +08:00
parent 2548f0bbba
commit 8c916930c8
4 changed files with 7 additions and 6 deletions

View File

@ -26,7 +26,7 @@
[keystone_authtoken]
...
auth_uri = http://controller:5000
www_authenticate_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password

View File

@ -63,7 +63,7 @@ class ContextHook(hooks.PecanHook):
auth_url = headers.get('X-Auth-Url')
if auth_url is None:
importutils.import_module('keystonemiddleware.auth_token')
auth_url = cfg.CONF.keystone_authtoken.auth_uri
auth_url = cfg.CONF.keystone_authtoken.www_authenticate_uri
state.request.context = context.make_context(
auth_token=auth_token,

View File

@ -222,7 +222,7 @@ class TestContextHook(base.FunctionalTest):
user_id=headers['X-User-Id'],
domain_id=headers['X-User-Domain-Id'],
domain_name=headers['X-User-Domain-Name'],
auth_url=cfg.CONF.keystone_authtoken.auth_uri,
auth_url=cfg.CONF.keystone_authtoken.www_authenticate_uri,
project=headers['X-Project-Name'],
project_id=headers['X-Project-Id'],
show_deleted=None,
@ -243,7 +243,7 @@ class TestContextHook(base.FunctionalTest):
user_id=headers['X-User-Id'],
domain_id=headers['X-User-Domain-Id'],
domain_name=headers['X-User-Domain-Name'],
auth_url=cfg.CONF.keystone_authtoken.auth_uri,
auth_url=cfg.CONF.keystone_authtoken.www_authenticate_uri,
project=headers['X-Project-Name'],
project_id=headers['X-Project-Id'],
show_deleted=None,
@ -265,7 +265,7 @@ class TestContextHook(base.FunctionalTest):
user_id=headers['X-User-Id'],
domain_id=headers['X-User-Domain-Id'],
domain_name=headers['X-User-Domain-Name'],
auth_url=cfg.CONF.keystone_authtoken.auth_uri,
auth_url=cfg.CONF.keystone_authtoken.www_authenticate_uri,
project=headers['X-Project-Name'],
project_id=headers['X-Project-Id'],
show_deleted=None,

View File

@ -60,7 +60,8 @@ class TestCase(BaseTestCase):
cfg.CONF.set_override("auth_type", "admin_token",
group='keystone_authtoken')
cfg.CONF.set_override("auth_uri", "http://127.0.0.1/identity",
cfg.CONF.set_override("www_authenticate_uri",
"http://127.0.0.1/identity",
group='keystone_authtoken')
app_config_path = os.path.join(os.path.dirname(__file__), 'config.py')