def missing_node_cache(prov_dir, node_list, provider, opts):
 cached_nodes = []
 for node in os.listdir(prov_dir):
  cached_nodes.append(os.path.splitext(node)[0])
 for node in cached_nodes:
  if (node not in node_list):
   delete_minion_cachedir(node, provider, opts)
   if (('diff_cache_events' in opts) and opts['diff_cache_events']):
    fire_event('event', 'cached node missing from provider', 'salt/cloud/{0}/cache_node_missing'.format(node), args={'missing node': node}, sock_dir=opts.get('sock_dir', os.path.join(__opts__['sock_dir'], 'master')), transport=opts.get('transport', 'zeromq'))

def missing_node_cache ( prov_dir , node_list , provider , opts ) : cached_nodes = [ ] for node in os . listdir ( prov_dir ) : cached_nodes . append ( os . path . splitext ( node ) [ 0 ] ) for node in cached_nodes : if ( node not in node_list ) : delete_minion_cachedir ( node , provider , opts ) if ( ( 'diff_cache_events' in opts ) and opts [ 'diff_cache_events' ] ) : fire_event ( 'event' , 'cached node missing from provider' , 'salt/cloud/{0}/cache_node_missing' . format ( node ) , args = { 'missing node' : node } , sock_dir = opts . get ( 'sock_dir' , os . path . join ( __opts__ [ 'sock_dir' ] , 'master' ) ) , transport = opts . get ( 'transport' , 'zeromq' ) )
check list of nodes to see if any nodes which were previously known about in the cache have been removed from the node list .