autotest: Use SSH Tunnel For Communication to Servo & Chameleon
Create a ssh tunnel for autoserv to communicate to servo/chameleon.
ServoHost/ChameleonHost call rpc_server_tracker to create a safe ssh connection
to servo/chameleon.
Related Change:
1. In AbstractSSH, remove |rpc_port_forward| since it does the same thing
as |create_ssh_tunnel|.
2. In AstractSSH, Change |rpc_port_disconnect| to |disconnect_ssh_tunnel|
since that the whole function is about to disconnect the existing ssh tunnel.
3. Add an exception of input arg 'command' in |xmlrpc_connect| of
rpc_server_tracker, so that it can be reused by ServoHost and ChameleonHost.
4. Add a |enable_ssh_tunnel_for_servo|/|enable_ssh_tunnel_for_chameleon| flag
to enable/disable ssh tunnel for servo/chameleon.
The refactoring of SSH tunneling code in ChameleonHost will be in a seperate CL
related to BUG=chromium:588806.
BUG=chromium:582646
TEST=For Servo:
Ran platform_ServoPowerStateController in local autotest instance & moblab to
test enable/disable SSH tunnel connection to ServoHost.
Ran network_WiFi_SimpleConnect.wifi_check11g in local autotest instance &
moblab to ensure that rpc_server_tracker still works other tasks.
For Chameleon:
Ran display_ServerChameleonConnection in chromeos2-row1-rack4-host4 to test
enable/disable SSH tunnel connection to ChameleonHost.
Change-Id: I45b5191f088f72819641f19d457d38a9d29cf1fd
Reviewed-on: https://chromium-review.googlesource.com/324841
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
6 files changed