From fd49b0ec8933188a489ca9f38beeb601a1108730 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 1 Jun 2012 14:42:32 -0400 Subject: Use openstack.common.cfg.CONF. Part of blueprint common-rpc. This patch makes the rpc code use the global config object from openstack-common. Based on some recent discussions on the mailing list, this may not be the final way configuration handling is done here, but it is certainly better than the register_opts() hack that is removed by this patch. Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6 --- nova/tests/__init__.py | 4 ---- nova/tests/rpc/test_kombu.py | 1 - nova/tests/rpc/test_kombu_ssl.py | 1 - nova/tests/rpc/test_qpid.py | 1 - 4 files changed, 7 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/__init__.py b/nova/tests/__init__.py index d04681935..d1fa17185 100644 --- a/nova/tests/__init__.py +++ b/nova/tests/__init__.py @@ -60,16 +60,12 @@ def reset_db(): def setup(): import mox # Fail fast if you don't have mox. Workaround for bug 810424 - from nova import rpc # Register rpc_backend before fake_flags sets it - FLAGS.register_opts(rpc.rpc_opts) - from nova import context from nova import db from nova.db import migration from nova.network import manager as network_manager from nova.tests import fake_flags fake_flags.set_defaults(FLAGS) - rpc.register_opts(FLAGS) if FLAGS.sql_connection == "sqlite://": if migration.db_version() > migration.INIT_VERSION: diff --git a/nova/tests/rpc/test_kombu.py b/nova/tests/rpc/test_kombu.py index a69dcdfe9..0055f253c 100644 --- a/nova/tests/rpc/test_kombu.py +++ b/nova/tests/rpc/test_kombu.py @@ -61,7 +61,6 @@ class RpcKombuTestCase(common.BaseRpcAMQPTestCase): def setUp(self): if kombu: self.rpc = impl_kombu - impl_kombu.register_opts(FLAGS) else: self.rpc = None super(RpcKombuTestCase, self).setUp() diff --git a/nova/tests/rpc/test_kombu_ssl.py b/nova/tests/rpc/test_kombu_ssl.py index e17521981..f74d38492 100644 --- a/nova/tests/rpc/test_kombu_ssl.py +++ b/nova/tests/rpc/test_kombu_ssl.py @@ -44,7 +44,6 @@ class RpcKombuSslTestCase(test.TestCase): def setUp(self): super(RpcKombuSslTestCase, self).setUp() if kombu: - impl_kombu.register_opts(FLAGS) self.flags(kombu_ssl_keyfile=SSL_KEYFILE, kombu_ssl_ca_certs=SSL_CA_CERT, kombu_ssl_certfile=SSL_CERT, diff --git a/nova/tests/rpc/test_qpid.py b/nova/tests/rpc/test_qpid.py index c523f3fe3..1b21158f8 100644 --- a/nova/tests/rpc/test_qpid.py +++ b/nova/tests/rpc/test_qpid.py @@ -66,7 +66,6 @@ class RpcQpidTestCase(test.TestCase): self.mock_receiver = None if qpid: - impl_qpid.register_opts(FLAGS) self.orig_connection = qpid.messaging.Connection self.orig_session = qpid.messaging.Session self.orig_sender = qpid.messaging.Sender -- cgit