X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fkeystone%2Ffiles%2Fhttpd%2Fkeystone.py;h=81c5348a35f649521fe0b1451fbb6ba142d9796b;hp=f5ce498c5152390bd084da88b0962fec2d39ce18;hb=71a236efd9f45828d875a0a5fd025108bb1dcada;hpb=52e13a709b5b959cd8995e7fa4f1b226bbe13a87 diff --git a/3rdparty/modules/keystone/files/httpd/keystone.py b/3rdparty/modules/keystone/files/httpd/keystone.py index f5ce498c..81c5348a 100644 --- a/3rdparty/modules/keystone/files/httpd/keystone.py +++ b/3rdparty/modules/keystone/files/httpd/keystone.py @@ -12,49 +12,20 @@ # License for the specific language governing permissions and limitations # under the License. -import logging -import os - -from oslo import i18n - - -# NOTE(dstanek): i18n.enable_lazy() must be called before -# keystone.i18n._() is called to ensure it has the desired lazy lookup -# behavior. This includes cases, like keystone.exceptions, where -# keystone.i18n._() is called at import time. -i18n.enable_lazy() - - -from keystone import backends -from keystone.common import dependency -from keystone.common import environment -from keystone.common import sql -from keystone import config -from keystone.openstack.common import log -from keystone import service - +# +# This file was copied from https://github.com/openstack/keystone/raw/a4f29db2b8cde1b445b86218fb5543295da2092c/httpd/keystone.py +# It's only required for platforms on which it is not packaged yet. +# It should be removed when available everywhere in a package. +# -CONF = config.CONF +import os -config.configure() -sql.initialize() -config.set_default_for_default_log_levels() +from keystone.server import wsgi as wsgi_server -CONF(project='keystone') -config.setup_logging() -environment.use_stdlib() name = os.path.basename(__file__) -if CONF.debug: - CONF.log_opt_values(log.getLogger(CONF.prog), logging.DEBUG) - - -drivers = backends.load_backends() - # 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 = service.loadapp('config:%s' % config.find_paste_config(), name) - -dependency.resolve_future_dependencies() +application = wsgi_server.initialize_application(name)