From 9e0993b6adbc23b31e0c88cdb7404416a144420d Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Fri, 1 May 2015 16:32:23 -0700 Subject: [PATCH] Deprecate config-based Quota Driver This patch displays a deprecation warning everytime the quota driver neutron.quota.ConfDriver is loaded. The driver will be removed in the "M" cycle. Change-Id: Ifb799755bce50bb089f8df020286fd2e95c80a68 Closes-Bug: #1430523 --- neutron/quota.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/neutron/quota.py b/neutron/quota.py index 3cf8e11d9..95e398aed 100644 --- a/neutron/quota.py +++ b/neutron/quota.py @@ -23,6 +23,8 @@ import webob from neutron.common import exceptions from neutron.i18n import _LI, _LW +from neutron.openstack.common import versionutils + LOG = logging.getLogger(__name__) QUOTA_DB_MODULE = 'neutron.db.quota_db' @@ -216,6 +218,12 @@ class QuotaEngine(object): "loaded plugin does not support 'quotas' table.")) if isinstance(_driver_class, basestring): _driver_class = importutils.import_object(_driver_class) + if isinstance(_driver_class, ConfDriver): + versionutils.report_deprecated_feature( + LOG, _LW("The quota driver neutron.quota.ConfDriver is " + "deprecated as of Liberty. " + "neutron.db.quota_db.DbQuotaDriver should be " + "used in its place")) self._driver = _driver_class LOG.info(_LI('Loaded quota_driver: %s.'), _driver_class) return self._driver -- 2.45.2