autotest: Print all servos from labstation

Cherry picked from labpack change http://crrev.com/c/2848787

BUG=b:185900632
TEST=run local repair

Change-Id: I2d3c8806c7940534458cde8937f52fa4d07a4ec9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/labpack/+/2848787
Tested-by: Otabek Kasimov <otabek@google.com>
Auto-Submit: Otabek Kasimov <otabek@google.com>
Reviewed-by: Garry Wang <xianuowang@chromium.org>
Commit-Queue: Otabek Kasimov <otabek@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2864654
diff --git a/server/hosts/servo_host.py b/server/hosts/servo_host.py
index 0293d0a..69dcd36 100644
--- a/server/hosts/servo_host.py
+++ b/server/hosts/servo_host.py
@@ -1401,6 +1401,16 @@
         """
         return self._dut_health_profile
 
+    def print_all_servo_of_host(self):
+        """Print all servos detected on the host."""
+        try:
+            logging.info('\tDevices detected on the host:')
+            devices = self.get_topology().get_list_available_servos()
+            for device in devices:
+                logging.info('\t%s', device)
+        except Exception as e:
+            logging.debug('(Not critical) Fail list all servos: %s', e)
+
 
 def make_servo_hostname(dut_hostname):
     """Given a DUT's hostname, return the hostname of its servo.
@@ -1635,6 +1645,8 @@
     # Reset or reboot servo device only during AdminRepair tasks.
     if try_servo_repair:
         if newhost._is_locked:
+            # Print available servos on the host for debugging.
+            newhost.print_all_servo_of_host()
             # Reset servo if the servo is locked, as we check if the servohost
             # is up, if the servohost is labstation and if the servohost is in
             # lab inside the locking logic.