Alex Miller | 56f1f0d | 2014-05-16 21:21:00 -0700 | [diff] [blame] | 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 | |
Alex Miller | 2312285 | 2014-08-21 14:38:53 -0700 | [diff] [blame] | 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']] |
Alex Miller | 56f1f0d | 2014-05-16 21:21:00 -0700 | [diff] [blame] | 17 | |
| 18 | for host in cautotest_hosts: |
| 19 | if host in cautotest_cq_hosts: |
| 20 | print host |