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