faft: Remove port arg from disconnect_ssh_tunnel() and usages
Part of the android deprecation effort.
The method's "port" argument is no longer useful since
only ADBHost/android used it.
BUG=b:138222680
TEST=ran firmware_FAFTRPC.all
Change-Id: I42714703c09b6dc12c655b8f0de2d666bc5a3a14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1872472
Commit-Queue: Oleg Loskutoff <[email protected]>
Tested-by: Oleg Loskutoff <[email protected]>
Reviewed-by: Wai-Hong Tam <[email protected]>
diff --git a/server/cros/chaos_lib/chaos_runner.py b/server/cros/chaos_lib/chaos_runner.py
index 6e563a2..a258ad7 100644
--- a/server/cros/chaos_lib/chaos_runner.py
+++ b/server/cros/chaos_lib/chaos_runner.py
@@ -268,8 +268,7 @@
batch_locker.unlock_aps()
if webdriver_tunnel:
- webdriver_instance.disconnect_ssh_tunnel(webdriver_tunnel,
- WEBDRIVER_PORT)
+ webdriver_instance.disconnect_ssh_tunnel(webdriver_tunnel)
webdriver_instance.close()
capturer.close()
logging.info('Powering off VM %s', webdriver_instance)
diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py
index c308c50..460b77a 100644
--- a/server/hosts/abstract_ssh.py
+++ b/server/hosts/abstract_ssh.py
@@ -959,14 +959,12 @@
return tunnel_proc
- def disconnect_ssh_tunnel(self, tunnel_proc, port):
+ def disconnect_ssh_tunnel(self, tunnel_proc):
"""
Disconnects a previously forwarded port from the server to the DUT for
RPC server connection.
@param tunnel_proc: a tunnel process returned from |create_ssh_tunnel|.
- @param port: remote port on the DUT, used in ADBHost (deprecated).
-
"""
if tunnel_proc.poll() is None:
tunnel_proc.terminate()
diff --git a/server/hosts/rpc_server_tracker.py b/server/hosts/rpc_server_tracker.py
index feb7890..60f9bfa 100644
--- a/server/hosts/rpc_server_tracker.py
+++ b/server/hosts/rpc_server_tracker.py
@@ -295,7 +295,7 @@
raise error.TestError('Failed to shutdown RPC server %s' %
remote_name)
- self._host.disconnect_ssh_tunnel(tunnel_proc, port)
+ self._host.disconnect_ssh_tunnel(tunnel_proc)
del self._rpc_proxy_map[port]