diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2013-01-08 06:52:32 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2013-01-08 10:23:40 +0000 |
| commit | 7a5e72d80d78049c8941a7d7ac1fb72bd9ccd2d0 (patch) | |
| tree | 99754a6ab4c180ebf935bbfd9ccdbd3168d7c62e | |
| parent | 580df542609eae01358d14f84bbeb278e8f86eac (diff) | |
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
| -rwxr-xr-x | bin/nova-console | 2 | ||||
| -rw-r--r-- | nova/compute/manager.py | 2 | ||||
| -rw-r--r-- | nova/config.py | 3 | ||||
| -rw-r--r-- | nova/console/api.py | 2 | ||||
| -rw-r--r-- | nova/console/rpcapi.py | 8 | ||||
| -rw-r--r-- | nova/tests/console/test_rpcapi.py | 1 |
6 files changed, 10 insertions, 8 deletions
diff --git a/bin/nova-console b/bin/nova-console index 80bd443ec..011855a19 100755 --- a/bin/nova-console +++ b/bin/nova-console @@ -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) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 03deb0b1d..d9a92c382 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -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') diff --git a/nova/config.py b/nova/config.py index fd3d0cc66..bbea5ef83 100644 --- a/nova/config.py +++ b/nova/config.py @@ -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'), diff --git a/nova/console/api.py b/nova/console/api.py index cad1999be..57c5cb0e3 100644 --- a/nova/console/api.py +++ b/nova/console/api.py @@ -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): diff --git a/nova/console/rpcapi.py b/nova/console/rpcapi.py index 15a3b46ec..5a91a81cb 100644 --- a/nova/console/rpcapi.py +++ b/nova/console/rpcapi.py @@ -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): diff --git a/nova/tests/console/test_rpcapi.py b/nova/tests/console/test_rpcapi.py index 6e9417ada..8d9d0514f 100644 --- a/nova/tests/console/test_rpcapi.py +++ b/nova/tests/console/test_rpcapi.py @@ -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): |
