Merge pull request #486 from asadoughi/master

Reload network strategy configuration explicitly
This commit is contained in:
Matt Dietz
2015-11-17 14:22:18 -06:00
2 changed files with 6 additions and 6 deletions

View File

@@ -32,6 +32,9 @@ class JSONStrategy(object):
def __init__(self, strategy=None):
self.subnet_strategy = {}
self.strategy = {}
self.load(strategy)
def load(self, strategy=None):
if not strategy:
self._compile_strategy(CONF.QUARK.default_net_strategy)
else:

View File

@@ -39,12 +39,9 @@ def main():
" the '--config-file' option!"))
config.setup_logging()
# NOTE(asadoughi): Reload quark-based python modules to re-initialize
# singletons that depend on configuration,
# such as quark.network_strategy.JSONStrategy.
reload(db_api)
reload(ip_types)
reload(models)
# Reload configuration for network strategy
from quark import network_strategy
network_strategy.STRATEGY.load()
context = neutron_context.get_admin_context()
network_ids = cfg.CONF.QUARK.null_routes_network_ids