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:
parent
9714f31f37
commit
580df54260
@ -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)
|
||||
|
@ -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'),
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user