karbor/etc/api-paste.ini
chenying 8b98ecd056 Fix the error about the translation of KarborException message
1, Introduce FaultWrapper from cinder to make exceptions into karbor's
wsgi faults. So that the messages can be translated, it can be shown
in a WSGI response.

2, Avoid Forcing the Translation of Translatable Variables[1]

[1]http://docs.openstack.org/developer/oslo.i18n/guidelines.html#avoid-forcing-the-translation-of-translatable-variables

Closes-Bug: 1698757
Change-Id: Id85871b3a4c9ec7049f42e15141a678dba7316c2
2017-06-19 19:44:54 +08:00

38 lines
1020 B
INI

#############
# OpenStack #
#############
[composite:osapi_karbor]
use = egg:Paste#urlmap
/: apiversions
/v1: openstack_karbor_api_v1
[composite:openstack_karbor_api_v1]
use = call:karbor.api.middleware.auth:pipeline_factory
noauth = request_id faultwrap noauth apiv1
keystone = request_id faultwrap authtoken keystonecontext apiv1
[filter:request_id]
paste.filter_factory = oslo_middleware:RequestId.factory
[filter:faultwrap]
paste.filter_factory = karbor.api.middleware.fault:FaultWrapper.factory
[filter:catch_errors]
paste.filter_factory = oslo_middleware:CatchErrors.factory
[filter:noauth]
paste.filter_factory = karbor.api.middleware.auth:NoAuthMiddleware.factory
[filter:keystonecontext]
paste.filter_factory = karbor.api.middleware.auth:KarborKeystoneContext.factory
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
[app:apiversions]
paste.app_factory = karbor.api.versions:Versions.factory
[app:apiv1]
paste.app_factory = karbor.api.v1.router:APIRouter.factory