munkireport_parser.py
def smart_report(record, report):
    """Generate report when there are smart errors"""
    if record[SMART_HEALTH] == "FAILED!":
        add_problem(
            report,
            "SMART",
            "SMART health: FAILED!",
            determine_acknowledgement(record, report, "ack-smart"),
        )
    elif record[SMART_ERROR_COUNT] is not None and int(record[SMART_ERROR_COUNT]) > 0:
        add_problem(
            report,
            "SMART",
            "SMART errors: {}".format(record[SMART_ERROR_COUNT]),
            determine_acknowledgement(record, report, "ack-smart"),
        )
Generate report when there are smart errors
Generate report when there are smart errors
Generate report when there are smart errors
def smart_report(record, report):
    if record[SMART_HEALTH] == "FAILED!":
        add_problem(
            report,
            "SMART",
            "SMART health: FAILED!",
            determine_acknowledgement(record, report, "ack-smart"),
        )
    elif record[SMART_ERROR_COUNT] is not None and int(record[SMART_ERROR_COUNT]) > 0:
        add_problem(
            report,
            "SMART",
            "SMART errors: {}".format(record[SMART_ERROR_COUNT]),
            determine_acknowledgement(record, report, "ack-smart"),
        )
def smart_report ( record , report ) : if record [ SMART_HEALTH ] == "FAILED!" : add_problem ( report , "SMART" , "SMART health: FAILED!" , determine_acknowledgement ( record , report , "ack-smart" ) , ) elif record [ SMART_ERROR_COUNT ] is not None and int ( record [ SMART_ERROR_COUNT ] ) > 0 : add_problem ( report , "SMART" , "SMART errors: {}" . format ( record [ SMART_ERROR_COUNT ] ) , determine_acknowledgement ( record , report , "ack-smart" ) , )
Generate report when there are smart errors
Generate report when there are smart errors
"""Generate report when there are smart errors"""
record
report