Deprecate httpd/keystone.py
Now that we have keystone-wsgi-admin and keystone-wsgi-public we can deprecate httpd/keystone.py. These 2 are already defined in setup.cfg pointing to wsgi.py to initialize the application. Change-Id: Ifcdfcb31e7be18b511a7c586d9ca259bc15bec44 Closes-Bug: 1494922
This commit is contained in:
parent
3f587c5fd5
commit
70a42e7a82
@ -14,12 +14,28 @@
|
||||
|
||||
import os
|
||||
|
||||
from oslo_log import log
|
||||
from oslo_log import versionutils
|
||||
|
||||
from keystone.i18n import _LW
|
||||
from keystone.server import wsgi as wsgi_server
|
||||
|
||||
|
||||
name = os.path.basename(__file__)
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
def deprecation_warning():
|
||||
versionutils.report_deprecated_feature(
|
||||
LOG,
|
||||
_LW('httpd/keystone.py is deprecated as of Mitaka'
|
||||
' in favor of keystone-wsgi-admin and keystone-wsgi-public'
|
||||
' and may be removed in O.')
|
||||
)
|
||||
|
||||
# NOTE(ldbragst): 'application' is required in this context by WSGI spec.
|
||||
# The following is a reference to Python Paste Deploy documentation
|
||||
# http://pythonpaste.org/deploy/
|
||||
application = wsgi_server.initialize_application(name)
|
||||
application = wsgi_server.initialize_application(
|
||||
name,
|
||||
post_log_configured_function=deprecation_warning)
|
||||
|
@ -47,7 +47,7 @@ KEYSTONE_HEADERS = [
|
||||
]
|
||||
|
||||
|
||||
def initialize_application(name):
|
||||
def initialize_application(name, post_log_configured_function=lambda: None):
|
||||
common.configure()
|
||||
|
||||
# Log the options used when starting if we're in debug mode...
|
||||
@ -56,6 +56,8 @@ def initialize_application(name):
|
||||
|
||||
environment.use_stdlib()
|
||||
|
||||
post_log_configured_function()
|
||||
|
||||
def loadapp():
|
||||
return keystone_service.loadapp(
|
||||
'config:%s' % config.find_paste_config(), name)
|
||||
|
Loading…
Reference in New Issue
Block a user