From a2e6a55a0d13b4c018f48ca243d0f33939164d7b Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Wed, 4 May 2016 14:53:39 +0900 Subject: [PATCH] Remove Limits dependency of legacy v2 API code In api-paste.ini, legacy_ratelimit has been unused since the patch I1476b2e364032d7c98f71df0cd61f1d1c19e005d. And there is a dependency of limits module on legacy v2 API code because the legacy_ratelimit remains. This patch removes these code for removing the dependency. Partially implements blueprint remove-legacy-v2-api-code Change-Id: I4ecf1c9bd8b419769d474ddbb8116fe834199843 --- etc/nova/api-paste.ini | 3 --- nova/api/openstack/compute/limits.py | 6 ------ 2 files changed, 9 deletions(-) diff --git a/etc/nova/api-paste.ini b/etc/nova/api-paste.ini index 66169559bfb0..20d6b848c0bc 100644 --- a/etc/nova/api-paste.ini +++ b/etc/nova/api-paste.ini @@ -48,9 +48,6 @@ paste.filter_factory = nova.api.openstack:FaultWrapper.factory [filter:noauth2] paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory -[filter:legacy_ratelimit] -paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory - [filter:sizelimit] paste.filter_factory = oslo_middleware:RequestBodySizeLimiter.factory diff --git a/nova/api/openstack/compute/limits.py b/nova/api/openstack/compute/limits.py index 9a9569afd271..a5b682ec1229 100644 --- a/nova/api/openstack/compute/limits.py +++ b/nova/api/openstack/compute/limits.py @@ -13,18 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from nova.api.openstack.compute.legacy_v2 import limits from nova.api.openstack.compute.views import limits as limits_views from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import quota -# NOTE(alex_xu): This is just for keeping backward compatible with v2 endpoint -# in api-paste.ini. This will be removed after v2 API code deprecated in the -# future. -RateLimitingMiddleware = limits.RateLimitingMiddleware - QUOTAS = quota.QUOTAS ALIAS = 'limits' authorize = extensions.os_compute_authorizer(ALIAS)