Move network_topic into nova.network.rpcapi

The network_topic opt is only used in nova.network.rpcapi and it makes
sense for the RPC module to "own" the topic option.

blueprint: scope-config-opts
Change-Id: Icd779f34df47ac6dd048b3e41995e872d8859872
This commit is contained in:
Mark McLoughlin 2013-01-08 06:48:04 +00:00
parent 9714f31f37
commit 580df54260
4 changed files with 8 additions and 6 deletions

View File

@ -41,7 +41,7 @@ from nova import service
from nova import utils
CONF = cfg.CONF
CONF.import_opt('network_topic', 'nova.config')
CONF.import_opt('network_topic', 'nova.network.rpcapi')
if __name__ == '__main__':
config.parse_args(sys.argv)

View File

@ -56,9 +56,6 @@ global_opts = [
cfg.StrOpt('scheduler_topic',
default='scheduler',
help='the topic scheduler nodes listen on'),
cfg.StrOpt('network_topic',
default='network',
help='the topic network nodes listen on'),
cfg.ListOpt('enabled_apis',
default=['ec2', 'osapi_compute', 'metadata'],
help='a list of APIs to enable by default'),

View File

@ -23,8 +23,14 @@ from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
from nova.openstack.common.rpc import proxy as rpc_proxy
rpcapi_opts = [
cfg.StrOpt('network_topic',
default='network',
help='the topic network nodes listen on'),
]
CONF = cfg.CONF
CONF.import_opt('network_topic', 'nova.config')
CONF.register_opts(rpcapi_opts)
class NetworkAPI(rpc_proxy.RpcProxy):

View File

@ -25,7 +25,6 @@ from nova.openstack.common import rpc
from nova import test
CONF = cfg.CONF
CONF.import_opt('network_topic', 'nova.config')
class NetworkRpcAPITestCase(test.TestCase):