Add suspend method.

Add method to be able to suspend machines from server side
without calling a client test: this way, we can suspend for hours.

Remove dummy_Suspend.

TEST=Run hardware_StorageStress/control.suspend
Run hardware_StorageStress/control.quick
Run kernel_MemoryRamoop/control

BUG=chromium:376881

Change-Id: Ic7e6624485e4473a90d575ed53ea89bb164724e0
Reviewed-on: https://chromium-review.googlesource.com/201385
Reviewed-by: Gwendal Grignou <[email protected]>
Commit-Queue: Gwendal Grignou <[email protected]>
Tested-by: Gwendal Grignou <[email protected]>
diff --git a/server/server_job.py b/server/server_job.py
index 2d5a93d..64a9b44 100644
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -735,27 +735,28 @@
         return self._run_group(name, None, function, *args, **dargs)[0]
 
 
-    def run_reboot(self, reboot_func, get_kernel_func):
+    def run_op(self, op, op_func, get_kernel_func):
         """\
         A specialization of run_group meant specifically for handling
-        a reboot. Includes support for capturing the kernel version
-        after the reboot.
+        management operation. Includes support for capturing the kernel version
+        after the operation.
 
-        reboot_func: a function that carries out the reboot
-
-        get_kernel_func: a function that returns a string
-        representing the kernel version.
+        Args:
+           op: name of the operation.
+           op_func: a function that carries out the operation (reboot, suspend)
+           get_kernel_func: a function that returns a string
+                            representing the kernel version.
         """
         try:
-            self.record('START', None, 'reboot')
-            reboot_func()
+            self.record('START', None, op)
+            op_func()
         except Exception, e:
             err_msg = str(e) + '\n' + traceback.format_exc()
-            self.record('END FAIL', None, 'reboot', err_msg)
+            self.record('END FAIL', None, op, err_msg)
             raise
         else:
             kernel = get_kernel_func()
-            self.record('END GOOD', None, 'reboot',
+            self.record('END GOOD', None, op,
                         optional_fields={"kernel": kernel})