Merge "Add PBR wsgi_scripts entrypoint for barbican api"

This commit is contained in:
Jenkins 2017-07-20 22:06:52 +00:00 committed by Gerrit Code Review
commit d3b4dc3150
3 changed files with 15 additions and 4 deletions

View File

@ -18,6 +18,7 @@ API application handler for Barbican
""" """
import os import os
from paste import deploy
import pecan import pecan
try: try:
@ -101,3 +102,9 @@ def create_main_app(global_config, **local_conf):
def create_version_app(global_config, **local_conf): def create_version_app(global_config, **local_conf):
wsgi_app = pecan.make_app(versions.VersionsController()) wsgi_app = pecan.make_app(versions.VersionsController())
return wsgi_app return wsgi_app
def get_api_wsgi_script():
conf = '/etc/barbican/barbican-api-paste.ini'
application = deploy.loadapp('config:%s' % conf)
return application

View File

@ -16,10 +16,11 @@
"""Use this file for deploying the API under mod_wsgi. """Use this file for deploying the API under mod_wsgi.
See http://pecan.readthedocs.org/en/latest/deployment.html for details. See http://pecan.readthedocs.org/en/latest/deployment.html for details.
NOTE(mtreinish): This wsgi script is deprecated since the wsgi app is now
exposed as an entrypoint via barbican-wsgi-api
""" """
from paste import deploy from barbican.api import app
conf = '/etc/barbican/barbican-api-paste.ini'
application = deploy.loadapp('config:%s' % conf)
application = app.get_api_wsgi_script()

View File

@ -40,6 +40,9 @@ console_scripts =
pkcs11-key-generation = barbican.cmd.pkcs11_key_generation:main pkcs11-key-generation = barbican.cmd.pkcs11_key_generation:main
barbican-retry = barbican.cmd.retry_scheduler:main barbican-retry = barbican.cmd.retry_scheduler:main
wsgi_scripts =
barbican-wsgi-api = barbican.api.app:get_api_wsgi_script
barbican.secretstore.plugin = barbican.secretstore.plugin =
store_crypto = barbican.plugin.store_crypto:StoreCryptoAdapterPlugin store_crypto = barbican.plugin.store_crypto:StoreCryptoAdapterPlugin
dogtag_crypto = barbican.plugin.dogtag:DogtagKRAPlugin dogtag_crypto = barbican.plugin.dogtag:DogtagKRAPlugin