From 87cc550332615234f399453d48ae639a275d5238 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 25 May 2017 08:54:00 -0700 Subject: [PATCH] Log deprecation warnings for account_white/blacklist ... with the hope that we can actually remove support for them in the future. Change-Id: Ia58e63a20df0cfe623834703230e39598958d9ee Related-Change: I532663f1d2c75d03170c5fdb9b330416822fbc88 --- swift/common/middleware/ratelimit.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/swift/common/middleware/ratelimit.py b/swift/common/middleware/ratelimit.py index 8782e9e85b..2e926aac3d 100644 --- a/swift/common/middleware/ratelimit.py +++ b/swift/common/middleware/ratelimit.py @@ -109,9 +109,19 @@ class RateLimitMiddleware(object): self.ratelimit_whitelist = \ [acc.strip() for acc in conf.get('account_whitelist', '').split(',') if acc.strip()] + if self.ratelimit_whitelist: + self.logger.warning('Option account_whitelist is deprecated. Use ' + 'an internal client to POST a `X-Account-' + 'Sysmeta-Global-Write-Ratelimit: WHITELIST` ' + 'header to the specific accounts instead.') self.ratelimit_blacklist = \ [acc.strip() for acc in conf.get('account_blacklist', '').split(',') if acc.strip()] + if self.ratelimit_blacklist: + self.logger.warning('Option account_blacklist is deprecated. Use ' + 'an internal client to POST a `X-Account-' + 'Sysmeta-Global-Write-Ratelimit: BLACKLIST` ' + 'header to the specific accounts instead.') self.container_ratelimits = interpret_conf_limits( conf, 'container_ratelimit_') self.container_listing_ratelimits = interpret_conf_limits(