#!/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.

# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables from the check-context which are necessary for
# resolving legacy discovery results such as [("SUMMARY", "diskstat_default_levels")]. Furthermore,
# it might also remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.cmciii import *  # pylint: disable=wildcard-import,unused-wildcard-import

# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables from the check-context which are necessary for
# resolving legacy discovery results such as [("SUMMARY", "diskstat_default_levels")]. Furthermore,
# it might also remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.temperature import *  # pylint: disable=wildcard-import,unused-wildcard-import

# Note: this check is obsolete, please use cmciii.temp_in_out instead

check_info["cmciii_lcp_airin"] = {
    "check_function": check_cmciii_lcp_fanunit,
    "inventory_function": lambda info: inventory_cmciii_lcp_fanunit("Air", "In", info),
    "has_perfdata": True,
    "service_description": "Temperature %s",
    "group": "temperature",
    "snmp_scan_function": snmp_scan_cmciii_lcp_fanunit,
    "snmp_info": (
        ".1.3.6.1.4.1.2606.7.4.2.2.1.10",
        [
            "2.6",
            "2.13",
            "2.15",
            "2.23",
            "2.21",
            "2.20",
            "2.19",
            "2.18",
            "2.17",
            "2.7",
            "2.8",
            "2.9",
        ],
    ),
}
#
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.6 Air.Temperature.DescName
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.7 Air.Temperature.In-Top
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.8 Air.Temperature.In-Mid
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.9 Air.Temperature.In-Bot
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.10 Air.Temperature.Out-Top
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.11 Air.Temperature.Out-Mid
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.12 Air.Temperature.Out-Bot
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.13 Air.Temperature.Status
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.14 Air.Temperature.Category
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.15 Air.Server-In.DescName
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.16 Air.Server-In.Setpoint
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.17 Air.Server-In.Average
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.18 Air.Server-In.SetPtHighAlarm
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.19 Air.Server-In.SetPtHighWarning
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.20 Air.Server-In.SetPtLowWarning
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.21 Air.Server-In.SetPtLowAlarm
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.22 Air.Server-In.Hysteresis
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.23 Air.Server-In.Status
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.24 Air.Server-In.Category
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.25 Air.Server-Out.DescName
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.26 Air.Server-Out.Average
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.27 Air.Server-Out.SetPtHighAlarm
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.28 Air.Server-Out.SetPtHighWarning
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.29 Air.Server-Out.SetPtLowWarning
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.30 Air.Server-Out.SetPtLowAlarm
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.31 Air.Server-Out.Hysteresis
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.32 Air.Server-Out.Status
# .1.3.6.1.4.1.2606.7.4.2.2.1.3.2.33 Air.Server-Out.Category
#
