def LoadCheckFromFile(file_path, check_id, overwrite_if_exists=True):
 configs = LoadConfigsFromFile(file_path)
 conf = configs.get(check_id)
 check = Check(**conf)
 check.Validate()
 CheckRegistry.RegisterCheck(check, source=('file:%s' % file_path), overwrite_if_exists=overwrite_if_exists)
 logging.debug('Loaded check %s from %s', check.check_id, file_path)
 return check

def LoadCheckFromFile ( file_path , check_id , overwrite_if_exists = True ) : configs = LoadConfigsFromFile ( file_path ) conf = configs . get ( check_id ) check = Check ( ** conf ) check . Validate ( ) CheckRegistry . RegisterCheck ( check , source = ( 'file:%s' % file_path ) , overwrite_if_exists = overwrite_if_exists ) logging . debug ( 'Loaded check %s from %s' , check . check_id , file_path ) return check
load a single check from a file .