def discover(self, metafile):
for report in self.reports:<EOL><INDENT>if report.remote_location == '<STR_LIT>':<EOL><INDENT>if naarad.utils.is_valid_file(os.path.join(os.path.join(report.location, self.resource_path), metafile)):<EOL><INDENT>with open(os.path.join(os.path.join(report.location, self.resource_path), metafile), '<STR_LIT:r>') as meta_file:<EOL><INDENT>if metafile == CONSTANTS.STATS_CSV_LIST_FILE:<EOL><INDENT>report.stats = meta_file.readlines()[<NUM_LIT:0>].split('<STR_LIT:U+002C>')<EOL><DEDENT>elif metafile == CONSTANTS.PLOTS_CSV_LIST_FILE:<EOL><INDENT>report.datasource = meta_file.readlines()[<NUM_LIT:0>].split('<STR_LIT:U+002C>')<EOL><DEDENT>elif metafile == CONSTANTS.CDF_PLOTS_CSV_LIST_FILE:<EOL><INDENT>report.cdf_datasource = meta_file.readlines()[<NUM_LIT:0>].split('<STR_LIT:U+002C>')<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>report.status = '<STR_LIT>'<EOL>self.status = '<STR_LIT>'<EOL>logger.error('<STR_LIT>', report.label)<EOL>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>stats_url = report.remote_location + '<STR_LIT:/>' + self.resource_path + '<STR_LIT:/>' + metafile<EOL>meta_file_data = naarad.httpdownload.stream_url(stats_url)<EOL>if meta_file_data:<EOL><INDENT>if metafile == CONSTANTS.STATS_CSV_LIST_FILE:<EOL><INDENT>report.stats = meta_file_data.split('<STR_LIT:U+002C>')<EOL><DEDENT>elif metafile == CONSTANTS.PLOTS_CSV_LIST_FILE:<EOL><INDENT>report.datasource = meta_file_data.split('<STR_LIT:U+002C>')<EOL><DEDENT>elif metafile == CONSTANTS.CDF_PLOTS_CSV_LIST_FILE:<EOL><INDENT>report.cdf_datasource = meta_file_data.split('<STR_LIT:U+002C>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>report.status = '<STR_LIT>'<EOL>self.status = '<STR_LIT>'<EOL>logger.error('<STR_LIT>', report.label)<EOL>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Determine what summary stats, time series, and CDF csv exist for the reports that need to be diffed.
:return: boolean: return whether the summary stats / time series / CDF csv summary was successfully located