#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.2.1 MCR1900 --> PERLE-MCR-MGT-MIB::chassisModelName.1
# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.4.1 103-001715T10033 --> PERLE-MCR-MGT-MIB::chassisSerialNumber.1
# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.5.1 0.0 --> PERLE-MCR-MGT-MIB::chassisBootloaderVersion.1
# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.6.1 1.0G6 --> PERLE-MCR-MGT-MIB::chassisFirmwareVersion.1
# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.7.1 0 --> PERLE-MCR-MGT-MIB::chassisOutStandWarnAlarms.1
# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.8.1 0 --> PERLE-MCR-MGT-MIB::chassisDiagStatus.1
# .1.3.6.1.4.1.1966.21.1.1.1.1.1.1.9.1 23 --> PERLE-MCR-MGT-MIB::chassisTemperature.1


def inv_perle_chassis(info):
    node = inv_tree("hardware.chassis.")
    model, serial, bootloader, fw, _alarms, _diagstate, _temp_str = info[0]

    node["serial"] = serial
    node["model"] = model
    node["bootloader"] = bootloader
    node["firmware"] = fw


inv_info["perle_chassis"] = {
    "inv_function": inv_perle_chassis,
}
