Added admin api as a separate falcon app.

This commit is contained in:
Douglas Mendizabal
2013-06-10 15:44:27 -05:00
parent d75c22a492
commit a9deec106b
5 changed files with 34 additions and 11 deletions

View File

@ -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

View 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

View File

@ -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

View 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

View 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