FAFT: Support running shell commands on the host

This change exposes new interfaces to run shell command on the host.

BUG=chromium:516398,chromium:527484
TEST=Started the XML RPC server and called the new RPCs.

Change-Id: I9fe4b22932002a4aec01f255b39e10c97ddc716d
Reviewed-on: https://chromium-review.googlesource.com/296512
Commit-Ready: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
diff --git a/client/cros/faft/rpc_functions.py b/client/cros/faft/rpc_functions.py
index caeaca8..3bc3f21 100755
--- a/client/cros/faft/rpc_functions.py
+++ b/client/cros/faft/rpc_functions.py
@@ -154,7 +154,7 @@
         if is_str:
             method = method.rsplit('.', 1)[0]
 
-        categories = ('system', 'bios', 'ec', 'kernel',
+        categories = ('system', 'host', 'bios', 'ec', 'kernel',
                       'tpm', 'cgpt', 'updater', 'rootfs')
         try:
             if method.split('.', 1)[0] in categories:
@@ -222,6 +222,21 @@
         """
         return self._os_if.run_shell_command_get_output(command)
 
+    def _host_run_shell_command(self, command):
+        """Run shell command on the host.
+
+        @param command: A shell command to be run.
+        """
+        self._os_if.run_host_shell_command(command)
+
+    def _host_run_shell_command_get_output(self, command):
+        """Run shell command and get its console output on the host.
+
+        @param command: A shell command to be run.
+        @return: A list of strings stripped of the newline characters.
+        """
+        return self._os_if.run_host_shell_command_get_output(command)
+
     def _system_software_reboot(self):
         """Request software reboot."""
         self._os_if.run_shell_command('reboot')