def main(): cfg.CONF(sys.argv[1:], project='solum') logging.setup('solum') solum.TLS.trace = trace_data.TraceData() LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") cfg.CONF.log_opt_values(LOG, std_logging.DEBUG) cfg.CONF.import_opt('topic', 'solum.worker.config', group='worker') cfg.CONF.import_opt('host', 'solum.worker.config', group='worker') cfg.CONF.import_opt('handler', 'solum.worker.config', group='worker') handlers = { 'noop': noop_handler.Handler, 'shell': shell_handler.Handler, 'shell_nobuild': shell_nobuild_handler.Handler, } endpoints = [ handlers[cfg.CONF.worker.handler](), ] server = service.Service(cfg.CONF.worker.topic, cfg.CONF.worker.host, endpoints) server.serve()
def main(): priv_context.init(root_helper=shlex.split(utils.get_root_helper())) cfg.CONF.register_cli_opts(cli_opts) service.prepare_service(sys.argv) solum.TLS.trace = trace_data.TraceData() LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") logging.setup(cfg.CONF, 'solum') cfg.CONF.import_opt('topic', 'solum.worker.config', group='worker') cfg.CONF.import_opt('host', 'solum.worker.config', group='worker') cfg.CONF.import_opt('handler', 'solum.worker.config', group='worker') handlers = { 'noop': noop_handler.Handler, 'default': default_handler.Handler, 'shell': shell_handler.Handler, } endpoints = [ handlers[cfg.CONF.worker.handler](), ] server = rpc_service.Service(cfg.CONF.worker.topic, cfg.CONF.worker.host, endpoints) server.serve()
def main(): cfg.CONF.register_cli_opts(cli_opts) service.prepare_service(sys.argv) solum.TLS.trace = trace_data.TraceData() LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") cfg.CONF.log_opt_values(LOG, std_logging.DEBUG) cfg.CONF.import_opt('topic', 'solum.worker.config', group='worker') cfg.CONF.import_opt('host', 'solum.worker.config', group='worker') cfg.CONF.import_opt('handler', 'solum.worker.config', group='worker') handlers = { 'noop': noop_handler.Handler, 'default': default_handler.Handler, 'shell': shell_handler.Handler, } endpoints = [ handlers[cfg.CONF.worker.handler](), ] server = rpc_service.Service(cfg.CONF.worker.topic, cfg.CONF.worker.host, endpoints) server.serve()
def main(): service.prepare_service(sys.argv) LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") logging.setup(cfg.CONF, 'solum') cfg.CONF.import_opt('topic', 'solum.conductor.config', group='conductor') cfg.CONF.import_opt('host', 'solum.conductor.config', group='conductor') endpoints = [ default_handler.Handler(), ] server = rpc_service.Service(cfg.CONF.conductor.topic, cfg.CONF.conductor.host, endpoints) server.serve()
def main(): cfg.CONF(sys.argv[1:], project='solum') logging.setup('solum') LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") cfg.CONF.log_opt_values(LOG, std_logging.DEBUG) cfg.CONF.import_opt('topic', 'solum.conductor.config', group='conductor') cfg.CONF.import_opt('host', 'solum.conductor.config', group='conductor') endpoints = [ default_handler.Handler(), ] server = service.Service(cfg.CONF.conductor.topic, cfg.CONF.conductor.host, endpoints) server.serve()
def main(): service.prepare_service(sys.argv) LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") logging.setup(cfg.CONF, 'solum') cfg.CONF.import_opt('topic', 'solum.deployer.config', group='deployer') cfg.CONF.import_opt('host', 'solum.deployer.config', group='deployer') cfg.CONF.import_opt('handler', 'solum.deployer.config', group='deployer') handlers = { 'noop': noop_handler.Handler, 'heat': heat_handler.Handler, } endpoints = [ handlers[cfg.CONF.deployer.handler](), ] server = rpc_service.Service(cfg.CONF.deployer.topic, cfg.CONF.deployer.host, endpoints) server.serve()
def main(): cfg.CONF(sys.argv[1:], project='solum') logging.setup('solum') LOG.info(_('Starting server in PID %s') % os.getpid()) LOG.debug("Configuration:") cfg.CONF.log_opt_values(LOG, std_logging.DEBUG) cfg.CONF.import_opt('topic', 'solum.deployer.config', group='deployer') cfg.CONF.import_opt('host', 'solum.deployer.config', group='deployer') cfg.CONF.import_opt('handler', 'solum.deployer.config', group='deployer') handlers = { 'noop': noop_handler.Handler, 'heat': heat_handler.Handler, } endpoints = [ handlers[cfg.CONF.deployer.handler](), ] server = service.Service(cfg.CONF.deployer.topic, cfg.CONF.deployer.host, endpoints) server.serve()
def test_create(self): topic, server, handlers = 'fake_topic', 'fake_host', [] rpc_service = service.Service(topic, server, handlers) self.assertIsNotNone(rpc_service._server)