def main(args): if (args['product'] == "rhel"): try: logging.info('Loading data for RHEL') data = data_load() except Exception: LOG.error(traceback.format_exc()) sys.exit(1) try: logging.info('Calling classifier') for row in range(len(data)): classified_data = classifier_rules(data.loc[row]) add_clasification( classified_data.loc['Job_ID'], {"error_type": classified_data.loc['Error_Type']}) except Exception: LOG.error(traceback.format_exc()) sys.exit(1) else: LOG.error(traceback.format_exc()) sys.exit(1)
def test_logs_yml(test_data): result = classifier_rules(test_data.loc[8]) assert result.loc['Error_Type'] == "non DCI"
def test_pre_run_hook_failure(test_data): result = classifier_rules(test_data.loc[1]) assert result.loc['Error_Type'] == "non DCI"
def test_install_yml(test_data): result = classifier_rules(test_data.loc[6]) assert result.loc['Error_Type'] == "DCI"
def test_sut_http_error(test_data): result = classifier_rules(test_data.loc[7]) assert result.loc['Error_Type'] == "non DCI"
def test_user_text_yml(test_data): result = classifier_rules(test_data.loc[0]) assert result.loc['Error_Type'] == "non DCI"
def test_gathering_fact_step(test_data): result = classifier_rules(test_data.loc[5]) assert result.loc['Error_Type'] == "DCI"
def test_dci_rhel_step(test_data): result = classifier_rules(test_data.loc[4]) assert result.loc['Error_Type'] == "DCI"
def test_sut_undefined_variable(test_data): result = classifier_rules(test_data.loc[3]) assert result.loc['Error_Type'] == "non DCI"
def test_sut_beaker_server(test_data): result = classifier_rules(test_data.loc[2]) assert result.loc['Error_Type'] == "non DCI"