Move console_topic into nova.console.rpcapi

Even though the console_topic opt is used outside nova.console.rpcapi,
it makes sense for the RPC module to "own" the topic option.

blueprint: scope-config-opts
Change-Id: I0f00927ca1c0bba7b21315240165e83e7075ebb7
This commit is contained in:
Mark McLoughlin 2013-01-08 06:52:32 +00:00
parent 580df54260
commit 7a5e72d80d
6 changed files with 10 additions and 8 deletions

View File

@ -39,7 +39,7 @@ from nova.openstack.common import log as logging
from nova import service
CONF = cfg.CONF
CONF.import_opt('console_topic', 'nova.config')
CONF.import_opt('console_topic', 'nova.console.rpcapi')
if __name__ == '__main__':
config.parse_args(sys.argv)

View File

@ -172,7 +172,7 @@ CONF.register_opts(interval_opts)
CONF.register_opts(timeout_opts)
CONF.register_opts(running_deleted_opts)
CONF.import_opt('allow_resize_to_same_host', 'nova.compute.api')
CONF.import_opt('console_topic', 'nova.config')
CONF.import_opt('console_topic', 'nova.console.rpcapi')
CONF.import_opt('host', 'nova.config')
CONF.import_opt('my_ip', 'nova.config')
CONF.import_opt('network_manager', 'nova.config')

View File

@ -50,9 +50,6 @@ global_opts = [
cfg.StrOpt('compute_topic',
default='compute',
help='the topic compute nodes listen on'),
cfg.StrOpt('console_topic',
default='console',
help='the topic console proxy nodes listen on'),
cfg.StrOpt('scheduler_topic',
default='scheduler',
help='the topic scheduler nodes listen on'),

View File

@ -25,7 +25,7 @@ from nova.openstack.common import rpc
from nova.openstack.common import uuidutils
CONF = cfg.CONF
CONF.import_opt('console_topic', 'nova.config')
CONF.import_opt('console_topic', 'nova.console.rpcapi')
class API(base.Base):

View File

@ -21,8 +21,14 @@ Client side of the console RPC API.
from nova.openstack.common import cfg
import nova.openstack.common.rpc.proxy
rpcapi_opts = [
cfg.StrOpt('console_topic',
default='console',
help='the topic console proxy nodes listen on'),
]
CONF = cfg.CONF
CONF.import_opt('console_topic', 'nova.config')
CONF.register_opts(rpcapi_opts)
class ConsoleAPI(nova.openstack.common.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('console_topic', 'nova.config')
class ConsoleRpcAPITestCase(test.TestCase):