Added admin api as a separate falcon app.
This commit is contained in:
@ -57,3 +57,13 @@ def create_main_app(global_config, **local_conf):
|
||||
api.add_route('/{0}'.format(performance_uri), performance)
|
||||
|
||||
return wsgi_app
|
||||
|
||||
|
||||
def create_admin_app(global_config, **local_conf):
|
||||
config.parse_args()
|
||||
|
||||
versions = res.VersionResource()
|
||||
wsgi_app = api = falcon.API()
|
||||
api.add_route('/', versions)
|
||||
|
||||
return wsgi_app
|
8
etc/barbican/barbican-admin-paste.ini
Normal file
8
etc/barbican/barbican-admin-paste.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[pipeline:main]
|
||||
pipeline = unauthenticated-context admin
|
||||
|
||||
[app:admin]
|
||||
paste.app_factory = barbican.api.app:create_admin_app
|
||||
|
||||
[filter:unauthenticated-context]
|
||||
paste.filter_factory = barbican.api.middleware.context:UnauthenticatedContextMiddleware.factory
|
@ -1,11 +0,0 @@
|
||||
[uwsgi]
|
||||
socket = :9311
|
||||
protocol = http
|
||||
processes = 1
|
||||
master = true
|
||||
vaccum = true
|
||||
no-default-app = true
|
||||
memory-report = true
|
||||
|
||||
pythonpath = /etc/barbican
|
||||
module = barbican.api.app:application
|
8
etc/barbican/vassals/barbican-admin.ini
Normal file
8
etc/barbican/vassals/barbican-admin.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[uwsgi]
|
||||
socket = :9312
|
||||
protocol = http
|
||||
processes = 1
|
||||
vacuum = true
|
||||
no-default-app = true
|
||||
memory-report = true
|
||||
paste = config:/etc/barbican/barbican-admin-paste.ini
|
8
etc/barbican/vassals/barbican-api.ini
Normal file
8
etc/barbican/vassals/barbican-api.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[uwsgi]
|
||||
socket = :9311
|
||||
protocol = http
|
||||
processes = 1
|
||||
vacuum = true
|
||||
no-default-app = true
|
||||
memory-report = true
|
||||
paste = config:/etc/barbican/barbican-api-paste.ini
|
Reference in New Issue
Block a user