diff --git a/cinder/api/middleware/sizelimit.py b/cinder/api/middleware/sizelimit.py index c110c0648f4..27813655582 100644 --- a/cinder/api/middleware/sizelimit.py +++ b/cinder/api/middleware/sizelimit.py @@ -15,7 +15,9 @@ Request Body limiting middleware. Compatibility shim for Kilo, while operators migrate to oslo.middleware. """ - +# TODO(tbarron): remove this shim in Ocata. Note that although the shim +# was added in Kilo, api-paste.ini was not converted to use oslo.middleware +# until Newton. from oslo_config import cfg from oslo_log import versionutils diff --git a/etc/cinder/api-paste.ini b/etc/cinder/api-paste.ini index 69a7d6b12b9..a761f53d079 100644 --- a/etc/cinder/api-paste.ini +++ b/etc/cinder/api-paste.ini @@ -47,7 +47,7 @@ paste.filter_factory = osprofiler.web:WsgiMiddleware.factory paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory [filter:sizelimit] -paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory +paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory [app:apiv1] paste.app_factory = cinder.api.v1.router:APIRouter.factory diff --git a/releasenotes/notes/use-oslo_middleware_sizelimit-5f171cf1c44444f8.yaml b/releasenotes/notes/use-oslo_middleware_sizelimit-5f171cf1c44444f8.yaml new file mode 100644 index 00000000000..e01fd827f53 --- /dev/null +++ b/releasenotes/notes/use-oslo_middleware_sizelimit-5f171cf1c44444f8.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - use oslo_middleware.sizelimit rather than cinder.api.middleware.sizelimit + compatibility shim +deprecations: + - cinder.api.middleware.sizelimit was deprecated in kilo and compatability + shim added to call into oslo_middleware. Using oslo_middleware.sizelimit + directly will allow us to remove the compatability shim in a future + release.