Revert "Reqd. core_plugin for plugin agents & show cfg opts loaded."

This reverts commit 06ce1329a0.

bug 1059923

patch was found to not be a valid fix.

Change-Id: I465974f60fd65b4d2c9449267ab108fac13d70c8
This commit is contained in:
Dan Wendlandt 2013-01-27 23:58:30 -08:00
parent 85c0d94fdf
commit 32daf52381
6 changed files with 0 additions and 70 deletions

View File

@ -1,28 +0,0 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# @author: Paul Michali, Cisco Systems, Inc.
def core_config_options(options):
'''Validate core configuration options.
Make sure that core configuration options that are needed are present and,
if not, generate warnings/errors, based on the severity. Will be used
only by the agents that require the option(s).
'''
if options.core_plugin is None:
raise Exception(_('Quantum core_plugin not configured!'))

View File

@ -27,14 +27,12 @@ import sys
import time import time
import eventlet import eventlet
import logging as std_logging
import pyudev import pyudev
from quantum.agent.linux import ip_lib from quantum.agent.linux import ip_lib
from quantum.agent.linux import utils from quantum.agent.linux import utils
from quantum.agent import rpc as agent_rpc from quantum.agent import rpc as agent_rpc
from quantum.agent import securitygroups_rpc as sg_rpc from quantum.agent import securitygroups_rpc as sg_rpc
from quantum.agent.common import validate
from quantum.common import config as logging_config from quantum.common import config as logging_config
from quantum.common import topics from quantum.common import topics
from quantum.common import utils as q_utils from quantum.common import utils as q_utils
@ -604,10 +602,6 @@ def main():
cfg.CONF(project='quantum') cfg.CONF(project='quantum')
logging_config.setup_logging(cfg.CONF) logging_config.setup_logging(cfg.CONF)
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
validate.core_config_options(cfg.CONF)
try: try:
interface_mappings = q_utils.parse_mappings( interface_mappings = q_utils.parse_mappings(
cfg.CONF.LINUX_BRIDGE.physical_interface_mappings) cfg.CONF.LINUX_BRIDGE.physical_interface_mappings)

View File

@ -24,9 +24,7 @@
import socket import socket
import sys import sys
import time import time
import logging as std_logging
from quantum.agent.common import validate
from quantum.agent.linux import ovs_lib from quantum.agent.linux import ovs_lib
from quantum.common import config as logging_config from quantum.common import config as logging_config
from quantum.common import topics from quantum.common import topics
@ -114,9 +112,6 @@ def main():
logging_config.setup_logging(config.CONF) logging_config.setup_logging(config.CONF)
config.CONF.log_opt_values(LOG, std_logging.DEBUG)
validate.core_config_options(config.CONF)
# Determine which agent type to use. # Determine which agent type to use.
integ_br = config.OVS.integration_bridge integ_br = config.OVS.integration_bridge
root_helper = config.AGENT.root_helper root_helper = config.AGENT.root_helper

View File

@ -24,9 +24,7 @@ import sys
import time import time
import eventlet import eventlet
import logging as std_logging
from quantum.agent.common import validate
from quantum.agent.linux import ip_lib from quantum.agent.linux import ip_lib
from quantum.agent.linux import ovs_lib from quantum.agent.linux import ovs_lib
from quantum.agent.linux import utils from quantum.agent.linux import utils
@ -703,9 +701,6 @@ def main():
cfg.CONF(project='quantum') cfg.CONF(project='quantum')
logging_config.setup_logging(cfg.CONF) logging_config.setup_logging(cfg.CONF)
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
validate.core_config_options(cfg.CONF)
try: try:
agent_config = create_agent_config_map(cfg.CONF) agent_config = create_agent_config_map(cfg.CONF)
except ValueError as e: except ValueError as e:

View File

@ -24,14 +24,12 @@ import httplib
import socket import socket
import sys import sys
import logging as std_logging
import netifaces import netifaces
from ryu.app import client from ryu.app import client
from ryu.app import conf_switch_key from ryu.app import conf_switch_key
from ryu.app import rest_nw_id from ryu.app import rest_nw_id
from sqlalchemy.ext.sqlsoup import SqlSoup from sqlalchemy.ext.sqlsoup import SqlSoup
from quantum.agent.common import validate
from quantum.agent.linux import ovs_lib from quantum.agent.linux import ovs_lib
from quantum.agent.linux.ovs_lib import VifPort from quantum.agent.linux.ovs_lib import VifPort
from quantum.common import config as logging_config from quantum.common import config as logging_config
@ -212,9 +210,6 @@ def main():
logging_config.setup_logging(cfg.CONF) logging_config.setup_logging(cfg.CONF)
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
validate.core_config_options(cfg.CONF)
integ_br = cfg.CONF.OVS.integration_bridge integ_br = cfg.CONF.OVS.integration_bridge
root_helper = cfg.CONF.AGENT.root_helper root_helper = cfg.CONF.AGENT.root_helper
options = {"sql_connection": cfg.CONF.DATABASE.sql_connection} options = {"sql_connection": cfg.CONF.DATABASE.sql_connection}

View File

@ -15,30 +15,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import unittest2 as unittest
from quantum.agent.common import config from quantum.agent.common import config
from quantum.agent.common import validate
from quantum.openstack.common import cfg
def test_setup_conf(): def test_setup_conf():
conf = config.setup_conf() conf = config.setup_conf()
assert conf.state_path.endswith('/var/lib/quantum') assert conf.state_path.endswith('/var/lib/quantum')
class TestCoreConfigOptions(unittest.TestCase):
def setUp(self):
self._saved_core_plugin = cfg.CONF.core_plugin
def tearDown(self):
cfg.CONF.set_override('core_plugin', self._saved_core_plugin)
def test_missing_required_core_option(self):
with self.assertRaises(Exception) as ex:
validate.core_config_options(cfg.CONF)
def test_have_required_core_option(self):
cfg.CONF.set_override('core_plugin', 'some_core_plugin_option')
validate.core_config_options(cfg.CONF)