def main(): api_config.init(sys.argv[1:]) api_config.setup_logging() application = app.setup_app() host = CONF.bind_host port = CONF.bind_port workers = CONF.api_workers if workers < 1: LOG.warning("Wrong worker number, worker = %(workers)s", workers) workers = 1 LOG.info("Server on http://%(host)s:%(port)s with %(workers)s", { 'host': host, 'port': port, 'workers': workers }) messaging.setup() systemd.notify_once() service = wsgi.Server(CONF, "OrchEngine", application, host, port) app.serve(service, CONF, workers) LOG.info("Configuration:") CONF.log_opt_values(LOG, std_logging.INFO) app.wait()
def main(): api_config.init(sys.argv[1:]) api_config.setup_logging() messaging.setup() dcmanager_messaging.setup() application = app.load_paste_app() if CONF.type not in consts.ENDPOINT_TYPES_LIST: LOG.error("Unsupported endpoint type: (%s)", CONF.type) sys.exit(1) CONF.register_opts(proxy_opts, CONF.type) host, port = utils.get_host_port_options(CONF) workers = CONF.api_workers if workers < 1: LOG.warning("Wrong worker number, worker = %(workers)s", workers) workers = 1 LOG.info("Server on http://%(host)s:%(port)s with %(workers)s", {'host': host, 'port': port, 'workers': workers}) systemd.notify_once() service = wsgi.Server(CONF, CONF.prog, application, host, port) app.serve(service, CONF, workers) LOG.info("Configuration:") CONF.log_opt_values(LOG, std_logging.INFO) app.wait()
def main(): snmp_config.init(sys.argv[1:]) cfg.CONF(project='dcorch', prog='dcorch-snmp') logging.setup(cfg.CONF, 'dcorch-snmp') logging.set_defaults() messaging.setup() snmp_engine.SNMPService(cfg)
def main(): logging.register_options(cfg.CONF) cfg.CONF(project='dcorch', prog='dcorch-engine') logging.setup(cfg.CONF, 'dcorch-engine') logging.set_defaults() messaging.setup() dmanager_messaging.setup() srv = engine.EngineService(cfg.CONF.host, consts.TOPIC_ORCH_ENGINE) launcher = service.launch(cfg.CONF, srv, workers=cfg.CONF.workers) # the following periodic tasks are intended serve as HA checking # srv.create_periodic_tasks() launcher.wait()
def main(): logging.register_options(cfg.CONF) cfg.CONF(project='dcmanager', prog='dcmanager-engine') logging.setup(cfg.CONF, 'dcmanager-engine') logging.set_defaults() messaging.setup() dcorch_messaging.setup() from dcmanager.manager import service as manager srv = manager.DCManagerService(cfg.CONF.host, consts.TOPIC_DC_MANAGER) launcher = service.launch(cfg.CONF, srv, workers=cfg.CONF.workers) # the following periodic tasks are intended serve as HA checking # srv.create_periodic_tasks() launcher.wait()
def setUp(self): super(TestAuditManager, self).setUp() self.ctxt = utils.dummy_context() dcorch_messaging.setup("fake://", optional=True)