Add a hosts attribute to server jobs for accessing all the hosts in
use as part of a server job, and replace the __del__ method on hosts
with an explicit close. When the job finishes it will take care to
close out any hosts left in job.hosts.

This will allow us to implement generic code that operates on all
hosts currently in use, and also fixes the general reliabilty issues
that we've seen with the __del__ method.

Risk: Medium
Visibility: Host.__del__ calls are pushed off until the end of the
job, and all hosts in use are available via job.hosts.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2427 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index fa1eb9b..f428914 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -118,6 +118,7 @@
         self.ssh_pass = ssh_pass
         self.run_test_cleanup = True
         self.last_boot_tag = None
+        self.hosts = set()
 
         self.stdout = fd_stack.fd_stack(1, sys.stdout)
         self.stderr = fd_stack.fd_stack(2, sys.stderr)