Revert "Moblab: Servo Support via Host Attributes."
This reverts commit 71f190bc31be36311c1c59d762a13a28754d7ea9.
Reverting as the db migration does not work on systems that have not touched the afe at all.
Change-Id: I0c6875ec17f9362b7e646471b6ae5d06c70b770d
Reviewed-on: https://chromium-review.googlesource.com/255350
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
diff --git a/server/hosts/servo_host.py b/server/hosts/servo_host.py
index cbe6099..c0f2a9b 100644
--- a/server/hosts/servo_host.py
+++ b/server/hosts/servo_host.py
@@ -25,17 +25,10 @@
from autotest_lib.client.common_lib.cros.network import ping_runner
from autotest_lib.server import site_utils as server_site_utils
from autotest_lib.server.cros.servo import servo
-from autotest_lib.server.cros.dynamic_suite import frontend_wrappers
from autotest_lib.server.hosts import ssh_host
from autotest_lib.site_utils.rpm_control_system import rpm_client
-# Names of the host attributes in the database that represent the values for
-# the servo_host and servo_port for a servo connected to the DUT.
-SERVO_HOST_ATTR = 'servo_host'
-SERVO_PORT_ATTR = 'servo_port'
-
-
class ServoHostException(error.AutoservError):
"""This is the base class for exceptions raised by ServoHost."""
pass
@@ -332,8 +325,6 @@
@raises ServoHostVerifyFailure if /var/lib/servod/config does not exist.
"""
- if self._is_localhost:
- return
try:
self.run('test -f /var/lib/servod/config')
except (error.AutoservRunError, error.AutoservSSHTimeout) as e:
@@ -653,19 +644,8 @@
@returns: A ServoHost object or None. See comments above.
"""
- if not utils.is_moblab():
- lab_servo_hostname = make_servo_hostname(dut)
- is_in_lab = utils.host_is_in_lab_zone(lab_servo_hostname)
- else:
- # Servos on Moblab are not in the actual lab.
- is_in_lab = False
- afe = frontend_wrappers.RetryingAFE(timeout_min=5, delay_sec=10)
- hosts = afe.get_hosts(hostname=dut)
- if hosts and SERVO_HOST_ATTR in hosts[0].attributes:
- servo_args = {}
- servo_args[SERVO_HOST_ATTR] = hosts[0].attributes[SERVO_HOST_ATTR]
- servo_args[SERVO_PORT_ATTR] = hosts[0].attributes.get(
- SERVO_PORT_ATTR, 9999)
+ lab_servo_hostname = make_servo_hostname(dut)
+ is_in_lab = utils.host_is_in_lab_zone(lab_servo_hostname)
if not is_in_lab:
if servo_args is None: