def main(): mogan_service.prepare_service(sys.argv) server_address = (CONF.serial_console.shellinaboxproxy_host, CONF.serial_console.shellinaboxproxy_port) httpd = shellinabox_console.ThreadingHTTPServer( server_address, shellinabox_console.ProxyHandler) httpd.service_start()
def main(): mogan_service.prepare_service(sys.argv) websocketproxy.MoganWebSocketProxy( listen_host=CONF.serial_console.socatproxy_host, listen_port=CONF.serial_console.socatproxy_port, file_only=True, RequestHandlerClass=websocketproxy.MoganProxyRequestHandler ).start_server()
def main(): command_opt = cfg.SubCommandOpt('command', title='Command', help=_('Available commands'), handler=add_command_parsers) CONF.register_cli_opt(command_opt) service.prepare_service(sys.argv) CONF.command.func()
def main(): gmr_opts.set_defaults(CONF) # Parse config file and command line options, then start logging mogan_service.prepare_service(sys.argv) gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) # Build and start the WSGI app launcher = mogan_service.process_launcher() server = mogan_service.WSGIService('mogan_api', CONF.api.enable_ssl_api) launcher.launch_service(server, workers=server.workers) launcher.wait()
def main(): gmr_opts.set_defaults(CONF) # Parse config file and command line options, then start logging mogan_service.prepare_service(sys.argv) gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) mgr = mogan_service.RPCService('mogan.engine.manager', 'EngineManager', constants.ENGINE_TOPIC) launcher = service.launch(CONF, mgr) launcher.wait()
def build_wsgi_app(): from mogan.common import service as mogan_service mogan_service.prepare_service(sys.argv) return setup_app()