def GetClientURNsForHostnames(hostnames, token=None):
 index = CreateClientIndex(token=token)
 keywords = set()
 for hostname in hostnames:
  if hostname.startswith('host:'):
   keywords.add(hostname)
  else:
   keywords.add(('host:%s' % hostname))
 results = index.ReadClientPostingLists(keywords)
 result = {}
 for (keyword, hits) in results.iteritems():
  result[keyword[len('host:'):]] = hits
 return result

def GetClientURNsForHostnames ( hostnames , token = None ) : index = CreateClientIndex ( token = token ) keywords = set ( ) for hostname in hostnames : if hostname . startswith ( 'host:' ) : keywords . add ( hostname ) else : keywords . add ( ( 'host:%s' % hostname ) ) results = index . ReadClientPostingLists ( keywords ) result = { } for ( keyword , hits ) in results . iteritems ( ) : result [ keyword [ len ( 'host:' ) : ] ] = hits return result
gets all client_ids for a given list of hostnames or fqdns .