Remove the deprecated config "quota_items"
It was deprecated at [1], and quota of resource will be registered at initialization of APIRouter. So, no need to use the config now. [1] https://review.openstack.org/#/c/181593 DocImpact: All references of 'quota_items' configuration option and its description should be removed from the docs. UpgradeImpact: Remove 'quota_items' configuration option from neutron.conf file. Change-Id: I0698772a49f51d7c65f1f4cf1ea7660cd07113a0 Closes-Bug: #1593772
This commit is contained in:
parent
b9c2f5444d
commit
ff73054e86
@ -21,19 +21,12 @@ from neutron._i18n import _
|
||||
QUOTA_DB_MODULE = 'neutron.db.quota.driver'
|
||||
QUOTA_DB_DRIVER = '%s.DbQuotaDriver' % QUOTA_DB_MODULE
|
||||
QUOTA_CONF_DRIVER = 'neutron.quota.ConfDriver'
|
||||
default_quota_items = ['network', 'subnet', 'port']
|
||||
QUOTAS_CFG_GROUP = 'QUOTAS'
|
||||
|
||||
|
||||
# quota_opts from neutron/quota/__init__.py
|
||||
# renamed quota_opts to core_quota_opts
|
||||
core_quota_opts = [
|
||||
cfg.ListOpt('quota_items',
|
||||
default=default_quota_items,
|
||||
deprecated_for_removal=True,
|
||||
help=_('Resource name(s) that are supported in quota '
|
||||
'features. This option is now deprecated for '
|
||||
'removal.')),
|
||||
cfg.IntOpt('default_quota',
|
||||
default=-1,
|
||||
help=_('Default number of resource allowed per tenant. '
|
||||
|
@ -34,7 +34,6 @@ LOG = logging.getLogger(__name__)
|
||||
QUOTA_DB_MODULE = quota.QUOTA_DB_MODULE
|
||||
QUOTA_DB_DRIVER = quota.QUOTA_DB_DRIVER
|
||||
QUOTA_CONF_DRIVER = quota.QUOTA_CONF_DRIVER
|
||||
default_quota_items = quota.default_quota_items
|
||||
|
||||
|
||||
# Register the configuration options
|
||||
@ -280,15 +279,3 @@ class QuotaEngine(object):
|
||||
|
||||
|
||||
QUOTAS = QuotaEngine.get_instance()
|
||||
|
||||
|
||||
def register_resources_from_config():
|
||||
# This operation is now deprecated. All the neutron core and extended
|
||||
# resource for which quota limits are enforced explicitly register
|
||||
# themselves with the quota engine.
|
||||
for resource_item in (set(cfg.CONF.QUOTAS.quota_items) -
|
||||
set(default_quota_items)):
|
||||
resource_registry.register_resource_by_name(resource_item)
|
||||
|
||||
|
||||
register_resources_from_config()
|
||||
|
@ -55,12 +55,7 @@ class QuotaExtensionTestCase(testlib_api.WebTestCase):
|
||||
|
||||
# Update the plugin and extensions path
|
||||
self.setup_coreplugin(TARGET_PLUGIN)
|
||||
cfg.CONF.set_override(
|
||||
'quota_items',
|
||||
['network', 'subnet', 'port', 'extra1'],
|
||||
group='QUOTAS')
|
||||
quota.QUOTAS = quota.QuotaEngine()
|
||||
quota.register_resources_from_config()
|
||||
self._plugin_patcher = mock.patch(TARGET_PLUGIN, autospec=True)
|
||||
self.plugin = self._plugin_patcher.start()
|
||||
self.plugin.return_value.supported_extension_aliases = ['quotas']
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
prelude: >
|
||||
Remove 'quota_items' configuration option from
|
||||
neutron.conf file. This option was deprecated since
|
||||
Liberty release and has no effect now.
|
||||
upgrade:
|
||||
- Remove 'quota_items' configuration option from
|
||||
neutron.conf file.
|
Loading…
x
Reference in New Issue
Block a user