Home | History | Annotate | Download | only in hosts

Lines Matching refs:Servo

9 """This file provides core logic for servo verify/repair process."""
36 from autotest_lib.server.cros.servo import servo
48 # the servo_host and servo_port for a servo connected to the DUT.
66 """Host class for a host that controls a servo, e.g. beaglebone."""
70 # Timeout for initializing servo signals.
84 A ServoHost instance represents a host that controls a servo.
89 @param servo_board: Board that the servo is connected to.
90 @param is_in_lab: True if the servo host is in Cros Lab. Default is set
92 called to check if the servo host is in Cros lab.
111 # Commands on the servo host must be run by the superuser.
129 target servo are reset to default values, and the USB stick is
132 servo_obj = servo.Servo(servo_host=self, servo_serial=self.servo_serial)
138 'Servo initialize timed out.')
143 """Disconnect our servo if it exists.
145 If we've previously successfully connected to our servo,
158 """Check whether the servo host is a lab device.
160 @returns: True if the servo host is in Cros Lab, otherwise False.
167 """Checks whether the servo host points to localhost.
192 """Check if a servo host is running chromeos.
194 @return: True if the servo host is running chromeos.
256 |dest| on the remote servo host.
269 """Run a command on the servo host.
271 Extends method `run` in SSHHost. If the servo host is a remote device,
273 If the servo host is 'localhost', it will call utils.system_output.
299 when servo host is not 'localhost'.
335 """Gather a list of duts that use this servo host.
346 """Determine the board for this servo host.
348 @returns a string representing this servo host's board.
355 """Choose which dut to schedule servo host reboot job.
358 scheduled for the servo host reboot job. For now we'll sort the
401 """Schedule a job to reboot the servo host.
444 """Reboot using special servo host reboot command."""
450 """Reboot this servo host if an upgrade is waiting.
469 logging.info('servo host has the following duts: %s', dut_list)
471 logging.info('servo host has multiple duts, scheduling '
476 logging.info('Rebooting servo host %s from build %s',
479 # Otherwise, the call will log reboot failure if servo does
481 # test job failure. If the test does not require servo, we
482 # don't want servo failure to fail the test with error:
499 'servo host %s failed to shut down.' %
504 logging.info('servo host %s back from reboot, with build %s',
508 'servo host %s failed to come back from reboot.' %
514 """Update the image on the servo host, if needed.
523 from the default for servo Hosts, trigger an update, but
553 # For servo image staging, we want it as more widely distributed as
564 logging.info('servo host %s already processing an update, update '
568 'servo host %s, from %s to %s', url, self.hostname,
585 metrics.Counter('chromeos/autotest/servo/'
594 logging.info('servo host %s does not require an update.',
599 logging.info('Waiting for servo update to complete.')
604 """Update the servo host and verify it's in a good state.
625 """Attempt to repair servo host.
637 """Return whether or not the servo host is powered by PoE."""
639 # For now, assume all servo hosts in the lab have power.
647 servo host.
663 """Get the cached servo.Servo object.
665 @return: a servo.Servo object.
671 """Given a DUT's hostname, return the hostname of its servo.
675 @return hostname of the DUT's servo.
679 host_parts[0] = host_parts[0] + '-servo'
684 """Given a servo host name, return if it's up or not.
686 @param servo_hostname: hostname of the servo host.
690 # Technically, this duplicates the SSH ping done early in the servo
694 # when our servo DNS name resolves, but there is no host at that IP.
695 logging.info('Pinging servo host at %s', servo_hostname)
703 """Map a board we get from the AFE to a servo appropriate value.
705 Many boards are identical to other boards for servo's purposes.
709 @return board we expect servo to have.
728 """Return servo data associated with a given DUT.
730 This checks for the presence of servo host and port attached to the
734 @param dut_host Instance of `Host` on which to find the servo
761 logging.error('servo port is not an int: %s', servo_port)
762 # Let's set the servo args to None since we're not creating
770 # TODO(jrbarnette): This test to use the default lab servo hostname
792 object for a servo connected to the given `dut`, subject to various
794 * When the `servo_args` parameter is not `None`, a servo
796 * Otherwise, if a servo exists in the lab and `try_lab_servo` is
798 * If `try_servo_repair` is true, then create a servo host and
800 * Otherwise, if the servo responds to `ping` then create a
801 servo host and check it with `verify()`.
807 has an explicit dependency on servo. In that case, we require that
811 TODO(jrbarnette): The special handling for servo in test control
815 Parameters for a servo host consist of a host name, port number, and
818 * Servo attributes from the `dut` parameter take precedence over
820 * If a DNS entry for the servo based on the DUT hostname exists in
827 servo parameters (if available).
828 @param servo_args A dictionary with servo parameters to use if
833 @param try_lab_servo If not true, servo host creation will be
836 @param try_servo_repair If true, check a servo host with
867 logging.exception('Servo %s failed for %s',