def run_parallel_map_providers_query(data, queue=None):
 reinit_crypto()
 cloud = Cloud(data['opts'])
 try:
  with context.func_globals_inject(cloud.clouds[data['fun']], __active_provider_name__=':'.join([data['alias'], data['driver']])):
   return (data['alias'], data['driver'], salt.utils.simple_types_filter(cloud.clouds[data['fun']]()))
 except Exception as err:
  log.debug("Failed to execute '{0}()' while querying for running nodes: {1}".format(data['fun'], err), exc_info_on_loglevel=logging.DEBUG)
  return (data['alias'], data['driver'], ())

def run_parallel_map_providers_query ( data , queue = None ) : reinit_crypto ( ) cloud = Cloud ( data [ 'opts' ] ) try : with context . func_globals_inject ( cloud . clouds [ data [ 'fun' ] ] , __active_provider_name__ = ':' . join ( [ data [ 'alias' ] , data [ 'driver' ] ] ) ) : return ( data [ 'alias' ] , data [ 'driver' ] , salt . utils . simple_types_filter ( cloud . clouds [ data [ 'fun' ] ] ( ) ) ) except Exception as err : log . debug ( "Failed to execute '{0}()' while querying for running nodes: {1}" . format ( data [ 'fun' ] , err ) , exc_info_on_loglevel = logging . DEBUG ) return ( data [ 'alias' ] , data [ 'driver' ] , ( ) )
this function will be called from another process when building the providers map .