From: Salvatore Orlando Date: Fri, 1 May 2015 23:32:23 +0000 (-0700) Subject: Deprecate config-based Quota Driver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9e0993b6adbc23b31e0c88cdb7404416a144420d;p=openstack-build%2Fneutron-build.git 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 --- 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