def start(): global server print >>sys.stderr, "Starting RPC server..." def wrapError(error, method, args, kwargs): error = handleError(error, method, args, kwargs) return sslrpc2.Failure(error.raw) for config in settings.get_own_interface_config(): server = sslrpc2.Server(('0.0.0.0', config['port']), beforeExecute=logCall, onError=wrapError, keyfile=settings.get_ssl_key_filename(), certfile=settings.get_ssl_cert_filename(), ca_certs=settings.get_ssl_ca_filename(), cert_reqs=ssl.CERT_REQUIRED) server.registerContainer(api) util.start_thread(server.serve_forever) print >>sys.stderr, "done."
def start(): print >>sys.stderr, "Starting RPC servers" global servers del servers[:] for conf in settings.get_own_interface_config(): server_address = ('', conf['port']) sslOpts = None if conf.get('ssl', False): sslOpts = rpc.SSLOpts(private_key=settings.get_ssl_key_filename(), certificate=settings.get_ssl_cert_filename(), client_certs=None) server = rpc.xmlrpc.XMLRPCServerIntrospection(server_address, sslOpts=sslOpts, loginFunc=login, beforeExecute=logCall, afterExecute=afterCall, onError=wrapError) server.register(api) print >>sys.stderr, " - %s:%d, SSL: %s" % (server_address[0], server_address[1], bool(sslOpts)) util.start_thread(server.serve_forever) servers.append(server)
def start(): global server print >> sys.stderr, "Starting RPC server..." def wrapError(error, method, args, kwargs): error = handleError(error, method, args, kwargs) return sslrpc2.Failure(error.raw) for config in settings.get_own_interface_config(): server = sslrpc2.Server(('0.0.0.0', config['port']), beforeExecute=logCall, onError=wrapError, keyfile=settings.get_ssl_key_filename(), certfile=settings.get_ssl_cert_filename(), ca_certs=settings.get_ssl_ca_filename(), cert_reqs=ssl.CERT_REQUIRED) server.registerContainer(api) util.start_thread(server.serve_forever) print >> sys.stderr, "done."