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