Move the reboot_followup out of reboot and into wait_for_restart. This works
more consistently since wait_for_restart gets called even by most code that
manages its own reboot instead of using host.reboot. This is important for some
services that get restarted after reboots, such as profilers.

Risk: Low
Visibility: Host.reboot_followup is called following reboots handled by
Host.wait_for_restart, not just Host.reboot.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2597 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/remote.py b/server/hosts/remote.py
index 4af6923..2c72321 100644
--- a/server/hosts/remote.py
+++ b/server/hosts/remote.py
@@ -120,8 +120,7 @@
                               "reboot command failed")
                 raise
             if wait:
-                self.wait_for_restart(timeout)
-                self.reboot_followup(**dargs)
+                self.wait_for_restart(timeout, **dargs)
 
         # if this is a full reboot-and-wait, run the reboot inside a group
         if wait:
@@ -136,13 +135,13 @@
             self.job.profilers.handle_reboot(self)
 
 
-    def wait_for_restart(self, timeout=DEFAULT_REBOOT_TIMEOUT):
+    def wait_for_restart(self, timeout=DEFAULT_REBOOT_TIMEOUT, **dargs):
         """
         Wait for the host to come back from a reboot. This wraps the
         generic wait_for_restart implementation in a reboot group.
         """
         def reboot_func():
-            super(RemoteHost, self).wait_for_restart(timeout=timeout)
+            super(RemoteHost, self).wait_for_restart(timeout=timeout, **dargs)
         self.log_reboot(reboot_func)