• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/python
2# A utility script used by servo-inventory.  Arguments on the
3# command line should be hostnames of DUTs in the lab.  For each
4# DUT, if there's a corresponding servo host name, print the DUT's
5# name.
6#
7# Error checking is kept to a minimum, because the only caller we
8# expect to have doesn't need it.
9
10import sys
11
12import common
13
14from autotest_lib.client.bin import utils
15from autotest_lib.server.hosts import servo_host
16
17for host in [l.strip() for l in sys.stdin.readlines()]:
18    servo_name = servo_host.make_servo_hostname(host.strip())
19    if utils.host_is_in_lab_zone(servo_name):
20        print host
21