Move compute_topic into nova.compute.rpcapi

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

blueprint: scope-config-opts
Change-Id: I453951825481b9a5ba1865f6bf1223f7b1e25f98
This commit is contained in:
Mark McLoughlin 2013-01-08 07:01:42 +00:00
parent 32cf601fc1
commit eac6e73223
10 changed files with 13 additions and 12 deletions

View File

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

View File

@ -26,7 +26,7 @@ from nova.openstack.common import cfg
from nova import utils
CONF = cfg.CONF
CONF.import_opt('compute_topic', 'nova.config')
CONF.import_opt('compute_topic', 'nova.compute.rpcapi')
authorize = extensions.extension_authorizer('compute',

View File

@ -89,7 +89,7 @@ compute_opts = [
CONF = cfg.CONF
CONF.register_opts(compute_opts)
CONF.import_opt('compute_topic', 'nova.config')
CONF.import_opt('compute_topic', 'nova.compute.rpcapi')
CONF.import_opt('consoleauth_topic', 'nova.consoleauth')
MAX_USERDATA_SIZE = 65535

View File

@ -24,8 +24,14 @@ from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
import nova.openstack.common.rpc.proxy
rpcapi_opts = [
cfg.StrOpt('compute_topic',
default='compute',
help='the topic compute nodes listen on'),
]
CONF = cfg.CONF
CONF.import_opt('compute_topic', 'nova.config')
CONF.register_opts(rpcapi_opts)
def _compute_topic(topic, ctxt, host, instance):

View File

@ -47,9 +47,6 @@ global_opts = [
cfg.StrOpt('my_ip',
default=_get_my_ip(),
help='ip address of this host'),
cfg.StrOpt('compute_topic',
default='compute',
help='the topic compute nodes listen on'),
cfg.ListOpt('enabled_apis',
default=['ec2', 'osapi_compute', 'metadata'],
help='a list of APIs to enable by default'),

View File

@ -49,7 +49,7 @@ from nova.openstack.common import uuidutils
CONF = cfg.CONF
CONF.import_opt('compute_topic', 'nova.config')
CONF.import_opt('compute_topic', 'nova.compute.rpcapi')
CONF.import_opt('sql_connection', 'nova.db.sqlalchemy.session')
LOG = logging.getLogger(__name__)

View File

@ -28,7 +28,7 @@ from nova.openstack.common import cfg
from nova.scheduler import driver
CONF = cfg.CONF
CONF.import_opt('compute_topic', 'nova.config')
CONF.import_opt('compute_topic', 'nova.compute.rpcapi')
class ChanceScheduler(driver.Scheduler):

View File

@ -51,7 +51,7 @@ scheduler_driver_opts = [
CONF = cfg.CONF
CONF.register_opts(scheduler_driver_opts)
CONF.import_opt('compute_topic', 'nova.config')
CONF.import_opt('compute_topic', 'nova.compute.rpcapi')
CONF.import_opt('instances_path', 'nova.compute.manager')
CONF.import_opt('libvirt_type', 'nova.virt.libvirt.driver')

View File

@ -71,7 +71,6 @@ QUOTAS = quota.QUOTAS
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
CONF.import_opt('compute_manager', 'nova.config')
CONF.import_opt('compute_topic', 'nova.config')
CONF.import_opt('host', 'nova.config')
CONF.import_opt('live_migration_retry_count', 'nova.compute.manager')

View File

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