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:
parent
32cf601fc1
commit
eac6e73223
@ -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)
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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'),
|
||||
|
@ -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__)
|
||||
|
@ -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):
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user