From b5ea60252f3421beb1bf1d82ca95757d383058f5 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Mon, 31 Dec 2012 16:03:21 +0000 Subject: [PATCH] Set default core_plugin to None Fixes bug 1093989 Change-Id: Ib0b77994b813e6b2ec0621949371c66d66472896 --- etc/quantum.conf | 2 +- quantum/common/config.py | 3 +-- quantum/common/test_lib.py | 2 +- quantum/manager.py | 5 +++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/etc/quantum.conf b/etc/quantum.conf index 9c837232a4..a57e507941 100644 --- a/etc/quantum.conf +++ b/etc/quantum.conf @@ -38,7 +38,7 @@ bind_port = 9696 # api_extensions_path = # Quantum plugin provider module -core_plugin = quantum.plugins.sample.SamplePlugin.FakePlugin +# core_plugin = # Advanced service modules # service_plugins = diff --git a/quantum/common/config.py b/quantum/common/config.py index 709471e665..b634d865fc 100644 --- a/quantum/common/config.py +++ b/quantum/common/config.py @@ -40,8 +40,7 @@ core_opts = [ cfg.StrOpt('api_extensions_path', default=""), cfg.StrOpt('policy_file', default="policy.json"), cfg.StrOpt('auth_strategy', default='keystone'), - cfg.StrOpt('core_plugin', - default='quantum.plugins.sample.SamplePlugin.FakePlugin'), + cfg.StrOpt('core_plugin'), cfg.ListOpt('service_plugins', default=[]), cfg.StrOpt('base_mac', default="fa:16:3e:00:00:00"), diff --git a/quantum/common/test_lib.py b/quantum/common/test_lib.py index 7e98d5789d..087fab19bd 100644 --- a/quantum/common/test_lib.py +++ b/quantum/common/test_lib.py @@ -284,7 +284,7 @@ def run_tests(c=None): # and override the values in it if needed (e.g., run_tests.py in # quantum/plugins/openvswitch/ ) test_config = { - "plugin_name": "quantum.plugins.sample.SamplePlugin.FakePlugin", + "plugin_name": "", "default_net_op_status": constants.NET_STATUS_ACTIVE, "default_port_op_status": constants.PORT_STATUS_ACTIVE, } diff --git a/quantum/manager.py b/quantum/manager.py index 00aca48068..c9053c44ea 100644 --- a/quantum/manager.py +++ b/quantum/manager.py @@ -71,6 +71,11 @@ class QuantumManager(object): if not options: options = {} + if cfg.CONF.core_plugin is None: + msg = _('Quantum core_plugin not configured!') + LOG.critical(msg) + raise Exception(msg) + # NOTE(jkoelker) Testing for the subclass with the __subclasshook__ # breaks tach monitoring. It has been removed # intentianally to allow v2 plugins to be monitored