Home | History | Annotate | Download | only in hosts

Lines Matching refs:Servo

9 """This file provides core logic for servo verify/repair process."""
31 from autotest_lib.server.cros.servo import servo
43 # the servo_host and servo_port for a servo connected to the DUT.
67 """Host class for a host that controls a servo, e.g. beaglebone."""
71 # Timeout for initializing servo signals.
86 A ServoHost instance represents a host that controls a servo.
93 @param servo_board: Board that the servo is connected to.
94 @param servo_model: Model that the servo is connected to.
95 @param is_in_lab: True if the servo host is in Cros Lab. Default is set
97 called to check if the servo host is in Cros lab.
117 # Commands on the servo host must be run by the superuser.
135 target servo are reset to default values, and the USB stick is
138 servo_obj = servo.Servo(servo_host=self, servo_serial=self.servo_serial)
144 'Servo initialize timed out.')
149 """Disconnect our servo if it exists.
151 If we've previously successfully connected to our servo,
164 """Check whether the servo host is a lab device.
166 @returns: True if the servo host is in Cros Lab, otherwise False.
173 """Checks whether the servo host points to localhost.
199 """Check if a servo host is running chromeos.
201 @return: True if the servo host is running chromeos.
265 |dest| on the remote servo host.
278 """Run a command on the servo host.
280 Extends method `run` in SSHHost. If the servo host is a remote device,
282 If the servo host is 'localhost', it will call utils.system_output.
308 when servo host is not 'localhost'.
344 """Gather a list of duts that use this servo host.
355 """Determine the board for this servo host.
357 @returns a string representing this servo host's board.
364 """Reboot using special servo host reboot command."""
370 """Reboot this servo host if an upgrade is waiting.
401 """Reboot this servo host because an upgrade is waiting."""
402 logging.info('Rebooting servo host %s from build %s', self.hostname,
405 # Otherwise, the call will log reboot failure if servo does
407 # test job failure. If the test does not require servo, we
408 # don't want servo failure to fail the test with error:
425 'servo host %s failed to shut down.' %
428 logging.info('servo host %s back from reboot, with build %s',
432 'servo host %s failed to come back from reboot.' %
437 """Update the image on the servo host, if needed.
446 from the default for servo Hosts, trigger an update, but
474 # For servo image staging, we want it as more widely distributed as
487 logging.info('servo host %s already processing an update, update '
493 'servo host %s, from %s to %s', url, self.hostname,
506 metrics.Counter('chromeos/autotest/servo/'
515 logging.info('servo host %s does not require an update.',
520 logging.info('Waiting for servo update to complete.')
525 """Update the servo host and verify it's in a good state.
529 message = 'Beginning verify for servo host %s port %s serial %s'
540 """Attempt to repair servo host.
544 message = 'Beginning repair for servo host %s port %s serial %s'
555 """Return whether or not the servo host is powered by PoE."""
557 # For now, assume all servo hosts in the lab have power.
565 servo host.
583 """Get the cached servo.Servo object.
585 @return: a servo.Servo object.
591 """Close the associated servo and the host object."""
602 """Given a DUT's hostname, return the hostname of its servo.
606 @return hostname of the DUT's servo.
610 host_parts[0] = host_parts[0] + '-servo'
615 """Given a servo host name, return if it's up or not.
617 @param servo_hostname: hostname of the servo host.
621 # Technically, this duplicates the SSH ping done early in the servo
625 # when our servo DNS name resolves, but there is no host at that IP.
626 logging.info('Pinging servo host at %s', servo_hostname)
634 """Map a board we get from the AFE to a servo appropriate value.
636 Many boards are identical to other boards for servo's purposes.
640 @return board we expect servo to have.
659 """Return servo data associated with a given DUT.
661 @param dut_host Instance of `Host` on which to find the servo
673 logging.error('servo port is not an int: %s',
696 object for a servo connected to the given `dut`, subject to various
698 * When the `servo_args` parameter is not `None`, a servo
700 * Otherwise, if a servo exists in the lab and `try_lab_servo` is
702 * If `try_servo_repair` is true, then create a servo host and
704 * Otherwise, if the servo responds to `ping` then create a
705 servo host and check it with `verify()`.
711 has an explicit dependency on servo. In that case, we require that
715 TODO(jrbarnette): The special handling for servo in test control
719 Parameters for a servo host consist of a host name, port number, and
722 * Servo attributes from the `dut` parameter take precedence over
724 * If a DNS entry for the servo based on the DUT hostname exists in
731 servo parameters (if available).
732 @param servo_args A dictionary with servo parameters to use if
737 @param try_lab_servo If not true, servo host creation will be
740 @param try_servo_repair If true, check a servo host with
789 logging.exception('servo repair failed for %s', newhost.hostname)
794 logging.exception('servo verify failed for %s', newhost.hostname)