Skip to content

Commit

Permalink
modernize quantum config in proper place
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gongysh committed Jul 16, 2013
1 parent b99b020 commit aa3e64f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion neutron/common/legacy.py
Expand Up @@ -77,7 +77,6 @@ def modernize_quantum_config(config):
'router_scheduler_driver',
'rpc_backend',
'service_plugins',
('QUOTAS', 'quota_driver'),
('SECURITYGROUP', 'firewall_driver'),
]

Expand Down
2 changes: 2 additions & 0 deletions neutron/manager.py
Expand Up @@ -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
Expand Down Expand Up @@ -115,6 +116,7 @@ def __init__(self, options=None, config_file=None):
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()
Expand Down
2 changes: 2 additions & 0 deletions neutron/quota.py
Expand Up @@ -20,6 +20,7 @@
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

Expand Down Expand Up @@ -51,6 +52,7 @@
]
# Register the configuration options
cfg.CONF.register_opts(quota_opts, 'QUOTAS')
legacy.override_config(cfg.CONF, [('QUOTAS', 'quota_driver')])


class ConfDriver(object):
Expand Down
2 changes: 2 additions & 0 deletions neutron/services/loadbalancer/plugin.py
Expand Up @@ -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
Expand All @@ -35,6 +36,7 @@
]

cfg.CONF.register_opts(lbaas_plugin_opts, "LBAAS")
legacy.override_config(cfg.CONF, [('LBAAS', 'driver_fqn')])


class LoadBalancerPlugin(loadbalancer_db.LoadBalancerPluginDb):
Expand Down

0 comments on commit aa3e64f

Please sign in to comment.