From aa3e64f9125e4c41de90213b75b2826bfd663527 Mon Sep 17 00:00:00 2001 From: Yong Sheng Gong Date: Sat, 13 Jul 2013 16:11:08 +0800 Subject: [PATCH] modernize quantum config in proper place Bug #1200558 At the beginning, we have not registered some configuration items. To modernize these items, we must do it after we register them. Change-Id: I90d2cdbe97daa2ec0a8c8b6c9686b6f76c4de9e4 --- neutron/common/legacy.py | 1 - neutron/manager.py | 2 ++ neutron/quota.py | 2 ++ neutron/services/loadbalancer/plugin.py | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/neutron/common/legacy.py b/neutron/common/legacy.py index 39bae31e31..cf37281a5d 100644 --- a/neutron/common/legacy.py +++ b/neutron/common/legacy.py @@ -77,7 +77,6 @@ def modernize_quantum_config(config): 'router_scheduler_driver', 'rpc_backend', 'service_plugins', - ('QUOTAS', 'quota_driver'), ('SECURITYGROUP', 'firewall_driver'), ] diff --git a/neutron/manager.py b/neutron/manager.py index 73e1d2ab05..bf54716335 100644 --- a/neutron/manager.py +++ b/neutron/manager.py @@ -18,6 +18,7 @@ from oslo.config import cfg +from neutron.common import legacy from neutron.common import utils from neutron.openstack.common import importutils from neutron.openstack.common import log as logging @@ -115,6 +116,7 @@ class NeutronManager(object): except ImportError: LOG.exception(_("Error loading plugin")) raise Exception(_("Plugin not found. ")) + legacy.modernize_quantum_config(cfg.CONF) self.plugin = plugin_klass() msg = validate_post_plugin_load() diff --git a/neutron/quota.py b/neutron/quota.py index 67e4efdc73..fd8c3b3426 100644 --- a/neutron/quota.py +++ b/neutron/quota.py @@ -20,6 +20,7 @@ from oslo.config import cfg import webob from neutron.common import exceptions +from neutron.common import legacy from neutron.openstack.common import importutils from neutron.openstack.common import log as logging @@ -51,6 +52,7 @@ quota_opts = [ ] # Register the configuration options cfg.CONF.register_opts(quota_opts, 'QUOTAS') +legacy.override_config(cfg.CONF, [('QUOTAS', 'quota_driver')]) class ConfDriver(object): diff --git a/neutron/services/loadbalancer/plugin.py b/neutron/services/loadbalancer/plugin.py index a2d9301703..642b14dfa5 100644 --- a/neutron/services/loadbalancer/plugin.py +++ b/neutron/services/loadbalancer/plugin.py @@ -17,6 +17,7 @@ from oslo.config import cfg +from neutron.common import legacy from neutron.db import api as qdbapi from neutron.db.loadbalancer import loadbalancer_db from neutron.openstack.common import importutils @@ -35,6 +36,7 @@ lbaas_plugin_opts = [ ] cfg.CONF.register_opts(lbaas_plugin_opts, "LBAAS") +legacy.override_config(cfg.CONF, [('LBAAS', 'driver_fqn')]) class LoadBalancerPlugin(loadbalancer_db.LoadBalancerPluginDb):