def _GetHWInfos(client_list, batch_size=10000, token=None):
 hw_infos = {}
 logging.info('%d clients to process.', len(client_list))
 c = 0
 for batch in utils.Grouper(client_list, batch_size):
  logging.info('Processing batch: %d-%d', c, (c + batch_size))
  c += len(batch)
  client_objs = aff4.FACTORY.MultiOpen(batch, age=aff4.ALL_TIMES, token=token)
  for client in client_objs:
   hwi = client.GetValuesForAttribute(client.Schema.HARDWARE_INFO)
   hw_infos[client.urn] = set([('%s' % x.serial_number) for x in hwi])
 return hw_infos

def _GetHWInfos ( client_list , batch_size = 10000 , token = None ) : hw_infos = { } logging . info ( '%d clients to process.' , len ( client_list ) ) c = 0 for batch in utils . Grouper ( client_list , batch_size ) : logging . info ( 'Processing batch: %d-%d' , c , ( c + batch_size ) ) c += len ( batch ) client_objs = aff4 . FACTORY . MultiOpen ( batch , age = aff4 . ALL_TIMES , token = token ) for client in client_objs : hwi = client . GetValuesForAttribute ( client . Schema . HARDWARE_INFO ) hw_infos [ client . urn ] = set ( [ ( '%s' % x . serial_number ) for x in hwi ] ) return hw_infos
opens the given clients in batches and returns hardware information .