]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Revert "Reqd. core_plugin for plugin agents & show cfg opts loaded."
authorDan Wendlandt <dan@nicira.com>
Mon, 28 Jan 2013 07:58:30 +0000 (23:58 -0800)
committerDan Wendlandt <dan@nicira.com>
Mon, 28 Jan 2013 07:58:30 +0000 (23:58 -0800)
This reverts commit 06ce1329a044b8e7be9db59811d4f4316d0d0743.

bug 1059923

patch was found to not be a valid fix.

Change-Id: I465974f60fd65b4d2c9449267ab108fac13d70c8

quantum/agent/common/validate.py [deleted file]
quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py
quantum/plugins/nec/agent/nec_quantum_agent.py
quantum/plugins/openvswitch/agent/ovs_quantum_agent.py
quantum/plugins/ryu/agent/ryu_quantum_agent.py
quantum/tests/unit/test_agent_config.py

diff --git a/quantum/agent/common/validate.py b/quantum/agent/common/validate.py
deleted file mode 100644 (file)
index 763f842..0000000
+++ /dev/null
@@ -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!'))
index 64ccaaeaf4168b4b2171bb23815ecb186aab4188..56d11ccfd2af2ce56554912daf6edb42dc28402b 100755 (executable)
@@ -27,14 +27,12 @@ import sys
 import time
 
 import eventlet
-import logging as std_logging
 import pyudev
 
 from quantum.agent.linux import ip_lib
 from quantum.agent.linux import utils
 from quantum.agent import rpc as agent_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 topics
 from quantum.common import utils as q_utils
@@ -604,10 +602,6 @@ def main():
     cfg.CONF(project='quantum')
 
     logging_config.setup_logging(cfg.CONF)
-
-    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
-    validate.core_config_options(cfg.CONF)
-
     try:
         interface_mappings = q_utils.parse_mappings(
             cfg.CONF.LINUX_BRIDGE.physical_interface_mappings)
index 5dc306e9b8291290806a6d7d09b7ecae491ee0ec..8c8786b4e204e645cf68a653ae7f3a5f7a4107fd 100755 (executable)
@@ -24,9 +24,7 @@
 import socket
 import sys
 import time
-import logging as std_logging
 
-from quantum.agent.common import validate
 from quantum.agent.linux import ovs_lib
 from quantum.common import config as logging_config
 from quantum.common import topics
@@ -114,9 +112,6 @@ def main():
 
     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.
     integ_br = config.OVS.integration_bridge
     root_helper = config.AGENT.root_helper
index 9a335d9718cda5591483112414a1fafb4354b86a..a814895b75c00e769215b9234b8dac3d282cef8c 100755 (executable)
@@ -24,9 +24,7 @@ import sys
 import time
 
 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 ovs_lib
 from quantum.agent.linux import utils
@@ -703,9 +701,6 @@ def main():
     cfg.CONF(project='quantum')
     logging_config.setup_logging(cfg.CONF)
 
-    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
-    validate.core_config_options(cfg.CONF)
-
     try:
         agent_config = create_agent_config_map(cfg.CONF)
     except ValueError as e:
index bc6e5df04a1e56aef11514dbb3494746f0d9bfcd..e20dba9ca169adca2bce746a6bec720fbe2b2cb4 100755 (executable)
@@ -24,14 +24,12 @@ import httplib
 import socket
 import sys
 
-import logging as std_logging
 import netifaces
 from ryu.app import client
 from ryu.app import conf_switch_key
 from ryu.app import rest_nw_id
 from sqlalchemy.ext.sqlsoup import SqlSoup
 
-from quantum.agent.common import validate
 from quantum.agent.linux import ovs_lib
 from quantum.agent.linux.ovs_lib import VifPort
 from quantum.common import config as logging_config
@@ -212,9 +210,6 @@ def main():
 
     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
     root_helper = cfg.CONF.AGENT.root_helper
     options = {"sql_connection": cfg.CONF.DATABASE.sql_connection}
index 8c1e4398c7f5936dcaeb1712fa4f8f174458a9cd..73e10ed01c38a3c8382b6568a9ce9648e594e29b 100644 (file)
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import unittest2 as unittest
-
 from quantum.agent.common import config
-from quantum.agent.common import validate
-from quantum.openstack.common import cfg
 
 
 def test_setup_conf():
     conf = config.setup_conf()
     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)