Revision e0003509 lib/server/noded.py
b/lib/server/noded.py | ||
---|---|---|
121 | 121 |
http.server.HttpServerRequestExecutor.__init__(self, *args, **kwargs) |
122 | 122 |
|
123 | 123 |
|
124 |
class NodeHttpServer(http.server.HttpServer):
|
|
124 |
class NodeRequestHandler(http.server.HttpServerHandler):
|
|
125 | 125 |
"""The server implementation. |
126 | 126 |
|
127 | 127 |
This class holds all methods exposed over the RPC interface. |
... | ... | |
130 | 130 |
# too many public methods, and unused args - all methods get params |
131 | 131 |
# due to the API |
132 | 132 |
# pylint: disable=R0904,W0613 |
133 |
def __init__(self, *args, **kwargs):
|
|
134 |
http.server.HttpServer.__init__(self, *args, **kwargs)
|
|
133 |
def __init__(self): |
|
134 |
http.server.HttpServerHandler.__init__(self)
|
|
135 | 135 |
self.noded_pid = os.getpid() |
136 | 136 |
|
137 | 137 |
def HandleRequest(self, req): |
... | ... | |
1051 | 1051 |
# startup of the whole node daemon because of this |
1052 | 1052 |
logging.critical("Can't init/verify the queue, proceeding anyway: %s", err) |
1053 | 1053 |
|
1054 |
handler = NodeRequestHandler() |
|
1055 |
|
|
1054 | 1056 |
mainloop = daemon.Mainloop() |
1055 |
server = NodeHttpServer(mainloop, options.bind_address, options.port, |
|
1056 |
ssl_params=ssl_params, ssl_verify_peer=True, |
|
1057 |
request_executor_class=request_executor_class) |
|
1057 |
server = \ |
|
1058 |
http.server.HttpServer(mainloop, options.bind_address, options.port, |
|
1059 |
handler, ssl_params=ssl_params, ssl_verify_peer=True, |
|
1060 |
request_executor_class=request_executor_class) |
|
1058 | 1061 |
server.Start() |
1062 |
|
|
1059 | 1063 |
return (mainloop, server) |
1060 | 1064 |
|
1061 | 1065 |
|
Also available in: Unified diff