Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Unified Diff: testing/legion/rpc_server.py

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/legion/rpc_methods.py ('k') | testing/legion/run_task.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/legion/rpc_server.py
diff --git a/testing/legion/client_rpc_server.py b/testing/legion/rpc_server.py
similarity index 94%
rename from testing/legion/client_rpc_server.py
rename to testing/legion/rpc_server.py
index 7a5f565156da667f7454703d4a04df3d145d7d92..43b431707e851c0601058c401a3dcf3d0201c255 100644
--- a/testing/legion/client_rpc_server.py
+++ b/testing/legion/rpc_server.py
@@ -2,10 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""The client RPC server code.
+"""The task RPC server code.
This server is an XML-RPC server which serves code from
-client_rpc_methods.RPCMethods.
+rpc_methods.RPCMethods.
This server will run until shutdown is called on the server object. This can
be achieved in 2 ways:
@@ -22,8 +22,8 @@ import SimpleXMLRPCServer
import SocketServer
#pylint: disable=relative-import
-import client_rpc_methods
import common_lib
+import rpc_methods
class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
@@ -33,10 +33,10 @@ class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
"""
def do_POST(self):
- """Verifies the client is authorized to perform RPCs."""
+ """Verifies the task is authorized to perform RPCs."""
if self.client_address[0] != self.server.authorized_address:
logging.error('Received unauthorized RPC request from %s',
- self.client_address[0])
+ self.task_address[0])
self.send_response(403)
response = 'Forbidden'
self.send_header('Content-type', 'text/plain')
@@ -60,7 +60,7 @@ class RPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer,
self.authorized_address = authorized_address
self.idle_timeout_secs = idle_timeout_secs
- self.register_instance(client_rpc_methods.RPCMethods(self))
+ self.register_instance(rpc_methods.RPCMethods(self))
self._shutdown_requested_event = threading.Event()
self._rpc_received_event = threading.Event()
« no previous file with comments | « testing/legion/rpc_methods.py ('k') | testing/legion/run_task.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698