From 9714f31f37e48e9c6f0fca3b3b6e8cd047769b09 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 8 Jan 2013 06:44:36 +0000 Subject: Move cert_topic into nova.cert.rpcapi The cert_topic opt is only used in nova.cert.rpcapi and it makes sense for the RPC module to "own" the topic option. blueprint: scope-config-opts Change-Id: If3584b8e1984e0425d9f33133f9d291739b04d49 --- nova/cert/rpcapi.py | 8 +++++++- nova/config.py | 3 --- nova/tests/cert/test_rpcapi.py | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'nova') diff --git a/nova/cert/rpcapi.py b/nova/cert/rpcapi.py index 79b136571..fdaa327cb 100644 --- a/nova/cert/rpcapi.py +++ b/nova/cert/rpcapi.py @@ -21,8 +21,14 @@ Client side of the cert manager RPC API. from nova.openstack.common import cfg import nova.openstack.common.rpc.proxy +rpcapi_opts = [ + cfg.StrOpt('cert_topic', + default='cert', + help='the topic cert nodes listen on'), +] + CONF = cfg.CONF -CONF.import_opt('cert_topic', 'nova.config') +CONF.register_opts(rpcapi_opts) class CertAPI(nova.openstack.common.rpc.proxy.RpcProxy): diff --git a/nova/config.py b/nova/config.py index 6b0ea60d6..d6f63d602 100644 --- a/nova/config.py +++ b/nova/config.py @@ -47,9 +47,6 @@ global_opts = [ cfg.StrOpt('my_ip', default=_get_my_ip(), help='ip address of this host'), - cfg.StrOpt('cert_topic', - default='cert', - help='the topic cert nodes listen on'), cfg.StrOpt('compute_topic', default='compute', help='the topic compute nodes listen on'), diff --git a/nova/tests/cert/test_rpcapi.py b/nova/tests/cert/test_rpcapi.py index f61d42408..dce325354 100644 --- a/nova/tests/cert/test_rpcapi.py +++ b/nova/tests/cert/test_rpcapi.py @@ -25,7 +25,6 @@ from nova.openstack.common import rpc from nova import test CONF = cfg.CONF -CONF.import_opt('cert_topic', 'nova.config') class CertRpcAPITestCase(test.TestCase): -- cgit