• Home
  • Raw
  • Download

Lines Matching refs:host

132     def verify(self, host):  argument
134 info = self._load_info(host)
136 self._validate_battery(host, info)
138 def _load_info(self, host): argument
140 info = host.get_power_supply_info()
156 def _validate_battery(self, host, info): argument
166 'host': host.hostname,
180 host.run('ectool chargecontrol normal', ignore_status=True)
183 info = self._load_info(host)
189 'model': host.host_info_store.get().model,
200 metrics_data = {'host': host.hostname,
201 'board': host.host_info_store.get().board}
230 def verify(self, host): argument
233 label_match = host.verify_cros_version_label()
239 ' on %s; %s', host.hostname, e)
277 def verify(self, host): argument
282 if not host.is_file_system_writable([testdir]):
298 def verify(self, host): argument
305 output = host.run(command=command, ignore_status=True).stdout
312 output = host.run(command=command, ignore_status=True).stdout
340 def verify(self, host): argument
342 result = host.run('test -f %s' % provisioner.PROVISION_FAILED,
358 def verify(self, host): argument
360 if _is_virtual_machine(host):
367 status = CryptohomeStatus(host)
401 def verify(self, host): argument
403 result = host.run('python -c "import json"',
408 search = host.run('which python', ignore_status=True)
424 def verify(self, host): argument
427 info = host.host_info_store.get()
432 result = host.run('crossystem devsw_boot', ignore_status=True).stdout
446 def verify(self, host): argument
448 result = host.run('crossystem dev_default_boot', ignore_status=True)
465 def verify(self, host): argument
467 info = host.host_info_store.get()
479 host.set_device_repair_state(
483 host_hwid = host.run('crossystem hwid', ignore_status=True).stdout
484 host_serial_number = self._get_serial_number(host, info_serial_number)
488 host.hostname)
494 'host': host.hostname,
507 host.set_device_repair_state(
510 def _get_serial_number(self, host, serial_number): argument
519 req = host.run('vpd -g serial_number', ignore_status=True)
524 l1 = host.run('vpd -l', ignore_status=True)
525 l2 = host.run('vpd -l |grep "\"serial_number\"="',
532 host.run(cmd % serial_number, ignore_status=True)
533 host.run('dump_vpd_log --force', ignore_status=True)
535 req = host.run('vpd -g serial_number', ignore_status=True)
574 def verify(self, host): argument
576 if self._get_enrollment_state(host):
581 def _get_enrollment_state(self, host): argument
583 response = host.run('grep "check_enrollment" %s' % self.VPD_CACHE,
594 def _is_applicable(self, host): argument
595 info = host.host_info_store.get()
620 def verify(self, host): argument
623 result = host.run('crossystem %s' % field, ignore_status=True)
634 def _is_applicable(self, host): argument
635 return cros_firmware._is_firmware_testing_device(host)
648 def verify(self, host): argument
651 status = CryptohomeStatus(host)
663 result = host.run('cryptohome --action=tpm_status')
681 def verify(self, host): argument
685 result = host.run('cryptohome --action=tpm_more_status')
690 result = host.run('cryptohome --action=tpm_attestation_get_ek')
710 def verify(self, host): argument
713 if not host.upstart_status('ap-controller'):
721 host.run('pgrep ap-controller')
742 def verify(self, host): argument
744 host.run('stop ui && start ui', ignore_status=True, timeout=10)
762 def verify(self, host): argument
766 usb_dev = host._servo_host._probe_and_validate_usb_dev()
770 host_info = host.host_info_store.get()
774 host.host_info_store.commit(host_info)
789 host.host_info_store.commit(host_info)
791 def _is_applicable(self, host): argument
792 if host.servo:
810 def verify(self, host): argument
812 verifier = audit_verify.VerifyDutStorage(host)
820 host.set_device_needs_replacement()
830 def _collect_logs(self, host): argument
833 local_log_dir = crashcollect.get_crashinfo_dir(host, dirname)
834 host.collect_logs('/var/log', local_log_dir, ignore_errors=True)
836 crashcollect.get_crashinfo(host, None)
838 def _check_reset_success(self, host): argument
841 if host.wait_up(host.BOOT_TIMEOUT):
842 if host.get_verifier_state('ssh') == hosts.VERIFY_SUCCESS:
849 self._collect_logs(host)
859 'Host %s is offline after %s.' % (host.hostname, self.tag),
873 def repair(self, host): argument
875 repair_utils.require_servo(host, ignore_state=True)
881 host.servo.sysrq_x()
888 self._check_reset_success(host)
900 def repair(self, host): argument
902 repair_utils.require_servo(host, ignore_state=True)
903 host.servo.get_power_state_controller().reset()
904 self._check_reset_success(host)
920 def repair(self, host): argument
923 host.servo.get_power_state_controller().cr50_reset()
924 self._check_reset_success(host)
929 if host.servo.main_device_is_ccd():
930 host.servo.initialize_dut()
932 def _is_applicable(self, host): argument
933 if host.servo:
934 if host.servo.has_control('cr50_reboot'):
948 def repair(self, host): argument
950 host.run('crossystem dev_default_boot=disk', ignore_status=True)
962 def repair(self, host): argument
966 host.run('/usr/share/vboot/bin/set_gbb_flags.sh 0',
968 host.run('crossystem disable_dev_request=1',
970 super(CrosRebootRepair, self).repair(host)
990 def repair(self, host): argument
991 logging.info('Removing %s label from the host', host.VERSION_PREFIX)
992 info = host.host_info_store.get()
994 host.host_info_store.commit(info)
1006 def repair(self, host): argument
1008 host.run('/usr/sbin/update_rw_vpd check_enrollment 0')
1011 tpm_utils.ClearTPMOwnerRequest(host, wait_for_ready=True,
1012 timeout=host.BOOT_TIMEOUT)
1014 def _is_applicable(self, host): argument
1015 info = host.host_info_store.get()
1034 def repair(self, host): argument
1036 image_name = host.get_cros_repair_image_name()
1038 devserver = dev_server.ImageServer.resolve(image_name, host.hostname)
1042 afe_utils.machine_install_and_update_labels(host, update_url)
1059 def repair(self, host): argument
1061 host.run('echo "fast safe" > '
1063 host.reboot(timeout=host.POWERWASH_BOOT_TIMEOUT, wait=True)
1064 super(PowerWashRepair, self).repair(host)
1083 def repair(self, host): argument
1085 repair_utils.require_servo(host, ignore_state=True)
1086 image_name = host.get_cros_repair_image_name()
1087 image_name_on_usb = host._servo_host.validate_image_usbkey()
1098 if not need_update_image and host.health_profile:
1099 repair_failed_count = host.health_profile.get_repair_fail_count()
1112 _, update_url = host.stage_image_for_servo()
1113 afe_utils.clean_provision_labels(host)
1114 host.servo_install(update_url, is_repair=True)
1115 afe_utils.add_provision_labels(host, host.VERSION_PREFIX, image_name)
1127 def repair(self, host): argument
1129 host.run('rm -f /var/cache/ap/setup-network', ignore_status=True)
1130 host.run('rm -f /home/chronos/.oobe_completed', ignore_status=True)
1131 host.run('rm -f /home/.shadow/.can_attempt_ownership',
1133 host.run('crossystem clear_tpm_owner_request=1', ignore_status=True)
1134 host.reboot()
1146 def repair(self, host): argument
1148 host.cleanup_services()
1397 def _is_virtual_machine(host): argument
1403 output = host.run('cat /proc/cpuinfo | grep "model name"',
1412 def __init__(self, host): argument
1414 self.update(_get_cryptohome_status(host))
1438 def _get_cryptohome_status(host): argument
1472 output = host.run('cryptohome --action=status').stdout.strip()