]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
modernize quantum config in proper place
authorYong Sheng Gong <gongysh@unitedstack.com>
Sat, 13 Jul 2013 08:11:08 +0000 (16:11 +0800)
committerYong Sheng Gong <gongysh@unitedstack.com>
Tue, 16 Jul 2013 15:15:17 +0000 (23:15 +0800)
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
neutron/manager.py
neutron/quota.py
neutron/services/loadbalancer/plugin.py

index 39bae31e3132eb41c33aef3c14b06415d43ba4fd..cf37281a5d46f66e58a37aab8ee48f53b04c18b4 100644 (file)
@@ -77,7 +77,6 @@ def modernize_quantum_config(config):
         'router_scheduler_driver',
         'rpc_backend',
         'service_plugins',
-        ('QUOTAS', 'quota_driver'),
         ('SECURITYGROUP', 'firewall_driver'),
     ]
 
index 73e1d2ab05a2f0f0976b3c4c20769aaacea5cb54..bf54716335ad839b79ea7e787a6a5b652c1e2446 100644 (file)
@@ -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()
index 67e4efdc734ddf158d1e04f92c935f8a4c871507..fd8c3b3426142a74a3c2e972bf169c0034514a1a 100644 (file)
@@ -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):
index a2d93017037eab70fa836b3d0497604a2568bd15..642b14dfa5d7469faa80998b9fc6b9bdfa32973e 100644 (file)
@@ -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):