Update references to auth_token middleware

There's references to the auth_token middleware in keystoncelient.
The auth_token middleware has been moved to keystonemiddleware and
the version in keystoneclient shouldn't be used anymore.

If these references aren't updated, then when options are changed in
keystonemiddleware.auth_token the heat-api will fail to start because
there's duplicate options in keystoneclient.middleware.auth_token.

Change-Id: I04573aa5ff967afe3e00329f797fcc71b779e7b3
Closes-Bug: #1379082
This commit is contained in:
Brant Knudson 2014-10-08 20:15:54 -05:00
parent b96aa6be12
commit 91ca44fe36
9 changed files with 36 additions and 10 deletions

View File

@ -119,7 +119,7 @@ class KeystoneClientV2(object):
@staticmethod
def _service_admin_creds():
# Import auth_token to have keystone_authtoken settings setup.
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
creds = {
'username': cfg.CONF.keystone_authtoken.admin_user,

View File

@ -33,7 +33,7 @@ class KeystoneClientTest(HeatTestCase):
self.ctx = utils.dummy_context()
# Import auth_token to have keystone_authtoken settings setup.
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
dummy_url = 'http://server.test:5000/v2.0'
cfg.CONF.set_override('auth_uri', dummy_url,

View File

@ -1078,7 +1078,7 @@
[keystone_authtoken]
#
# Options defined in keystoneclient.middleware.auth_token
# Options defined in keystonemiddleware.auth_token
#
# Prefix to prepend at the beginning of the path. Deprecated,
@ -1195,6 +1195,32 @@
# value)
#memcache_secret_key=<None>
# (optional) number of seconds memcached server is considered
# dead before it is tried again. (integer value)
#memcache_pool_dead_retry=300
# (optional) max total number of open connections to every
# memcached server. (integer value)
#memcache_pool_maxsize=10
# (optional) socket timeout in seconds for communicating with
# a memcache server. (integer value)
#memcache_pool_socket_timeout=3
# (optional) number of seconds a connection to memcached is
# held unused in the pool before it is closed. (integer value)
#memcache_pool_unused_timeout=60
# (optional) number of seconds that an operation will wait to
# get a memcache client connection from the pool. (integer
# value)
#memcache_pool_conn_get_timeout=10
# (optional) use the advanced (eventlet safe) memcache client
# pool. The advanced pool will only work under python 2.x.
# (boolean value)
#memcache_use_advanced_pool=false
# (optional) indicate whether to set the X-Service-Catalog
# header. If False, middleware will not ask for service
# catalog on token validation and will not set the X-Service-

View File

@ -66,7 +66,7 @@ class EC2Token(wsgi.Middleware):
else:
# Import auth_token to have keystone_authtoken settings setup.
# We can use the auth_uri from the keystone_authtoken section
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
return cfg.CONF.keystone_authtoken['auth_uri']
@staticmethod

View File

@ -34,7 +34,7 @@ class AuthUrlFilter(wsgi.Middleware):
return self.conf['auth_uri']
else:
# Import auth_token to have keystone_authtoken settings setup.
auth_token_module = 'keystoneclient.middleware.auth_token'
auth_token_module = 'keystonemiddleware.auth_token'
importutils.import_module(auth_token_module)
return cfg.CONF.keystone_authtoken.auth_uri

View File

@ -79,7 +79,7 @@ class KeystoneClientV3(object):
self.v3_endpoint = self.context.auth_url.replace('v2.0', 'v3')
else:
# Import auth_token to have keystone_authtoken settings setup.
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
self.v3_endpoint = cfg.CONF.keystone_authtoken.auth_uri.replace(
'v2.0', 'v3')
@ -219,7 +219,7 @@ class KeystoneClientV3(object):
def _service_admin_creds(self):
# Import auth_token to have keystone_authtoken settings setup.
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
creds = {
'username': cfg.CONF.keystone_authtoken.admin_user,
'password': cfg.CONF.keystone_authtoken.admin_password,

View File

@ -499,7 +499,7 @@ class Ec2TokenTest(HeatTestCase):
def test_call_ok_auth_uri_ks_authtoken(self):
# Import auth_token to have keystone_authtoken settings setup.
importutils.import_module('keystoneclient.middleware.auth_token')
importutils.import_module('keystonemiddleware.auth_token')
dummy_url = 'http://123:5000/v2.0'
cfg.CONF.set_override('auth_uri', dummy_url,
group='keystone_authtoken')

View File

@ -30,7 +30,7 @@ from heat.tests import utils
cfg.CONF.import_opt('region_name_for_services', 'heat.common.config')
cfg.CONF.import_group('keystone_authtoken',
'keystoneclient.middleware.auth_token')
'keystonemiddleware.auth_token')
class KeystoneClientTest(HeatTestCase):

View File

@ -1,3 +1,3 @@
export HEAT_CONFIG_GENERATOR_EXTRA_MODULES=keystoneclient.middleware.auth_token
export HEAT_CONFIG_GENERATOR_EXTRA_MODULES=keystonemiddleware.auth_token
export HEAT_CONFIG_GENERATOR_EXTRA_LIBRARIES="heat.common.config heat.common.wsgi oslo.messaging oslo.db"
export HEAT_CONFIG_GENERATOR_EXCLUDED_FILES="heat/common/config.py heat/common/wsgi.py heat/openstack/common/sslutils.py"