Index: testing/legion/run_task.py |
diff --git a/testing/legion/client_controller.py b/testing/legion/run_task.py |
similarity index 61% |
rename from testing/legion/client_controller.py |
rename to testing/legion/run_task.py |
index dd80c2948d073251603ea7113fec08b016494c91..6a55073551f98819af34bf095ca221089c3f4fc3 100755 |
--- a/testing/legion/client_controller.py |
+++ b/testing/legion/run_task.py |
@@ -3,11 +3,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-"""The main client_controller code. |
- |
-This code is the main entry point for the client machines and handles |
-registering with the host server and running the local RPC server. |
-""" |
+"""The main task entrypoint.""" |
import argparse |
import logging |
@@ -16,32 +12,32 @@ import sys |
import time |
#pylint: disable=relative-import |
-import client_rpc_server |
import common_lib |
+import rpc_server |
def main(): |
print ' '.join(sys.argv) |
common_lib.InitLogging() |
- logging.info('Client controller starting') |
+ logging.info('Task starting') |
parser = argparse.ArgumentParser() |
parser.add_argument('--otp', |
help='One time token used to authenticate with the host') |
- parser.add_argument('--host', |
- help='The ip address of the host') |
+ parser.add_argument('--controller', |
+ help='The ip address of the controller machine') |
parser.add_argument('--idle-timeout', type=int, |
default=common_lib.DEFAULT_TIMEOUT_SECS, |
help='The idle timeout for the rpc server in seconds') |
args, _ = parser.parse_known_args() |
logging.info( |
- 'Registering with discovery server at %s using OTP %s', args.host, |
- args.otp) |
- server = common_lib.ConnectToServer(args.host).RegisterClient( |
+ 'Registering with registration server at %s using OTP "%s"', |
+ args.controller, args.otp) |
+ server = common_lib.ConnectToServer(args.controller).RegisterTask( |
args.otp, common_lib.MY_IP) |
- server = client_rpc_server.RPCServer(args.host, args.idle_timeout) |
+ server = rpc_server.RPCServer(args.controller, args.idle_timeout) |
server.serve_forever() |
return 0 |