Home | History | Annotate | Download | only in contrib
      1 #!/usr/bin/python
      2 
      3 """
      4 Finds hosts that are shared between both cautotest and cautotest-cq.
      5 """
      6 
      7 import common
      8 from autotest_lib.server import frontend
      9 
     10 cautotest = frontend.AFE(server='cautotest')
     11 cautotest_cq = frontend.AFE(server='cautotest-cq')
     12 
     13 cautotest_hosts = [x['hostname'] for x in cautotest.run('get_hosts')
     14                    if not x['locked']]
     15 cautotest_cq_hosts = [x['hostname'] for x in cautotest_cq.run('get_hosts')
     16                       if not x['locked']]
     17 
     18 for host in cautotest_hosts:
     19     if host in cautotest_cq_hosts:
     20         print host
     21