Merge remote branch 'cros/upstream' into autotest-rebase

Merged to upstream trunk@5066, from trunk@4749.

There is no way I could enlist each individual CL from the upstream here since it will blow up the changelist description field.

BUG=
TEST=
Had patched this CL into a fresh cut client to avoid any side effect.
run_remote_test bvt from both emerged location and third_party/autotest/file.

Both test passed!

We should also keep any eye on this to see how it gets propagated into cautotest server.
TBR=dalecurtis

Change-Id: I72f2bc7a9de530178484aea1bfb5ace68bcad029
diff --git a/server/control_segments/cleanup b/server/control_segments/cleanup
index 1a201bd..6ac6788 100644
--- a/server/control_segments/cleanup
+++ b/server/control_segments/cleanup
@@ -1,8 +1,5 @@
 def cleanup(machine):
-    hostname, user, passwd, port = parse_machine(machine, ssh_user,
-                                                 ssh_port, ssh_pass)
-    host = hosts.create_host(hostname, user=user, port=port, initialize=False,
-                             password=passwd, auto_monitor=False)
+    host = hosts.create_host(machine, initialize=False, auto_monitor=False)
     host.cleanup()
 
 
diff --git a/server/control_segments/client_wrapper b/server/control_segments/client_wrapper
index f8acae3..0d29c7e 100644
--- a/server/control_segments/client_wrapper
+++ b/server/control_segments/client_wrapper
@@ -2,9 +2,7 @@
 
 
 def run_client(machine):
-    hostname, user, passwd, port = parse_machine(machine, ssh_user, ssh_port,
-                                                 ssh_pass)
-    host = hosts.create_host(hostname, user=user, port=port, password=passwd)
+    host = hosts.create_host(machine)
     host.log_kernel()
     at.run(control, host=host)
 
diff --git a/server/control_segments/crashdumps b/server/control_segments/crashdumps
index 7bad63d..b5ebe78 100644
--- a/server/control_segments/crashdumps
+++ b/server/control_segments/crashdumps
@@ -2,10 +2,7 @@
 
 
 def crashdumps(machine):
-    hostname, user, passwd, port = parse_machine(machine, ssh_user,
-                                                 ssh_port, ssh_pass)
-    host = hosts.create_host(hostname, user=user, port=port, initialize=False,
-                             password=passwd, auto_monitor=False)
+    host = hosts.create_host(machine, initialize=False, auto_monitor=False)
     crashcollect.get_crashdumps(host, test_start_time)
 
 
diff --git a/server/control_segments/crashinfo b/server/control_segments/crashinfo
index c273620..c802832 100644
--- a/server/control_segments/crashinfo
+++ b/server/control_segments/crashinfo
@@ -2,10 +2,7 @@
 
 
 def crashinfo(machine):
-    hostname, user, passwd, port = parse_machine(machine, ssh_user,
-                                                 ssh_port, ssh_pass)
-    host = hosts.create_host(hostname, user=user, port=port, initialize=False,
-                             password=passwd, auto_monitor=False)
+    host = hosts.create_host(machine, initialize=False, auto_monitor=False)
     crashcollect.get_crashinfo(host, test_start_time)
 
 
diff --git a/server/control_segments/install b/server/control_segments/install
index aba79ae..20d6944 100644
--- a/server/control_segments/install
+++ b/server/control_segments/install
@@ -1,8 +1,5 @@
 def install(machine):
-    hostname, user, passwd, port = parse_machine(machine, ssh_user,
-                                                 ssh_port, ssh_pass)
-    host = hosts.create_host(hostname, user=user, port=port, initialize=False,
-                             password=passwd, auto_monitor=False)
+    host = hosts.create_host(machine, initialize=False, auto_monitor=False)
     host.machine_install()