def get_auto_conf_images(agentConfig):
 from config import PathNotFound, get_auto_confd_path
 auto_conf_images = {}
 try:
  auto_confd_path = get_auto_confd_path()
 except PathNotFound:
  log.error("Couldn't find the check auto-configuration folder, no auto configuration will be used.")
  return None
 for yaml_file in os.listdir(auto_confd_path):
  check_name = yaml_file.split('.')[0]
  try:
   auto_conf = check_yaml(urljoin(auto_confd_path, yaml_file))
  except Exception as e:
   log.error(('Enable to load the auto-config, yaml file.\n%s' % str(e)))
   auto_conf = {}
  images = auto_conf.get('docker_images', [])
  for image in images:
   auto_conf_images[image] = check_name
 return auto_conf_images

def get_auto_conf_images ( agentConfig ) : from config import PathNotFound , get_auto_confd_path auto_conf_images = { } try : auto_confd_path = get_auto_confd_path ( ) except PathNotFound : log . error ( "Couldn't find the check auto-configuration folder, no auto configuration will be used." ) return None for yaml_file in os . listdir ( auto_confd_path ) : check_name = yaml_file . split ( '.' ) [ 0 ] try : auto_conf = check_yaml ( urljoin ( auto_confd_path , yaml_file ) ) except Exception as e : log . error ( ( 'Enable to load the auto-config, yaml file.\n%s' % str ( e ) ) ) auto_conf = { } images = auto_conf . get ( 'docker_images' , [ ] ) for image in images : auto_conf_images [ image ] = check_name return auto_conf_images
walk through the auto_config folder and build a dict of auto-configurable images .