munkireport_parser.py
def generic_report(record, report):
    """Add generic information to the report"""

    company = get_company(record)
    report["SLA"] = company
    report["Serial"] = record[SERIAL_NUMBER]
    report["Model"] = record[MACHINE_MODEL]
    report["Device Type"] = record[MACHINE_NAME]
    report["Hostname"] = record[COMPUTER_NAME]

    if record[LONG_USERNAME] is not None:
        user_name = record[LONG_USERNAME]
    else:
        user_name = "unknown"
    report["Username"] = user_name
Add generic information to the report
Add generic information to the report
Add generic information to the report
def generic_report(record, report):
    company = get_company(record)
    report["SLA"] = company
    report["Serial"] = record[SERIAL_NUMBER]
    report["Model"] = record[MACHINE_MODEL]
    report["Device Type"] = record[MACHINE_NAME]
    report["Hostname"] = record[COMPUTER_NAME]
    if record[LONG_USERNAME] is not None:
        user_name = record[LONG_USERNAME]
    else:
        user_name = "unknown"
    report["Username"] = user_name
def generic_report ( record , report ) : company = get_company ( record ) report [ "SLA" ] = company report [ "Serial" ] = record [ SERIAL_NUMBER ] report [ "Model" ] = record [ MACHINE_MODEL ] report [ "Device Type" ] = record [ MACHINE_NAME ] report [ "Hostname" ] = record [ COMPUTER_NAME ] if record [ LONG_USERNAME ] is not None : user_name = record [ LONG_USERNAME ] else : user_name = "unknown" report [ "Username" ] = user_name
Add generic information to the report
Add generic information to the report
"""Add generic information to the report"""
record
report