• Home
  • Raw
  • Download

Lines Matching refs:afe_host

175 def _create_host(hostname, afe, afe_host):  argument
188 'afe_host': afe_host,
194 def _try_lock_host(afe_host): argument
206 afe_host.modify(locked=True,
214 def _try_unlock_host(afe_host): argument
226 afe_host.modify(locked=False, lock_reason='')
283 afe_host = afe.get_hosts(id=host_id)[0]
284 if afe_host.status in host_states.IDLE_STATES:
290 def _ensure_host_idle(afe, afe_host): argument
311 if afe_host.shard:
312 afe = frontend.AFE(server=afe_host.shard)
313 afe_host = afe.get_hosts(id=afe_host.id)[0]
314 if afe_host.status in host_states.IDLE_STATES:
316 afe.run('abort_special_tasks', host_id=afe_host.id, is_active=1)
317 return not retry.timeout(_wait_for_idle, (afe, afe_host.id),
343 afe_host = hostlist[0]
344 if not afe_host.locked:
345 if _try_lock_host(afe_host):
349 if not _ensure_host_idle(afe, afe_host):
350 if unlock_on_failure and not _try_unlock_host(afe_host):
359 afe_host = afe.create_host(hostname,
368 _ensure_label_in_afe(afe_host, 'board', arguments.board)
369 _ensure_label_in_afe(afe_host, 'model', arguments.model)
371 afe_host = afe.get_hosts([hostname])[0]
372 return afe_host, unlock_on_failure
375 def _ensure_label_in_afe(afe_host, label_name, label_value): argument
387 labels = labellib.LabelsMapping(afe_host.labels)
389 afe_host.add_labels(['%s:%s' % (label_name, label_value)])
397 afe_host.hostname))
493 afe_host, unlock_on_failure = _get_afe_host(afe, hostname, host_attrs,
497 host = _create_host(hostname, afe, afe_host)
515 afe_host.add_labels([platform])
516 version = [label for label in afe_host.labels
519 afe_host.remove_labels(version)
521 if unlock_on_failure and not _try_unlock_host(afe_host):
528 if not _try_unlock_host(afe_host):
673 afe_host = afe.get_hosts(hostname=host)
674 if afe_host:
675 servo_port = afe_host[0].attributes.get(servo_host.SERVO_PORT_ATTR)