def SearchClients(query_str, token=None, limit=1000):
 client_schema = aff4.AFF4Object.classes['VFSGRRClient'].SchemaCls
 index = client_index.CreateClientIndex(token=token)
 client_list = index.LookupClients([query_str])
 result_set = aff4.FACTORY.MultiOpen(client_list, token=token)
 results = []
 for result in result_set:
  results.append((result, str(result.Get(client_schema.HOSTNAME)), str(result.Get(client_schema.OS_VERSION)), str(result.Get(client_schema.PING))))
  if (len(results) >= limit):
   break
 return results

def SearchClients ( query_str , token = None , limit = 1000 ) : client_schema = aff4 . AFF4Object . classes [ 'VFSGRRClient' ] . SchemaCls index = client_index . CreateClientIndex ( token = token ) client_list = index . LookupClients ( [ query_str ] ) result_set = aff4 . FACTORY . MultiOpen ( client_list , token = token ) results = [ ] for result in result_set : results . append ( ( result , str ( result . Get ( client_schema . HOSTNAME ) ) , str ( result . Get ( client_schema . OS_VERSION ) ) , str ( result . Get ( client_schema . PING ) ) ) ) if ( len ( results ) >= limit ) : break return results
search indexes for clients .