#!/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.
# Example output:
# parsed is used
# {u'vendor': u'VMware, Inc.', u'name': u'VMware ESXi', u'propertyCollector': u'ha-property-collector', u'apiVersion': u'6.7.3', u'sessionManager': u'ha-sessionmgr', u'licenseManager': u'ha-license-manager', u'version': u'6.7.0', u'build': u'15160138', u'osType': u'vmnix-x86', u'perfManager': u'ha-perfmgr', u'rootFolder': u'ha-folder-root'}


def inv_esx_systeminfo(parsed):
    node = inv_tree("software.os.")

    node["vendor"] = parsed.get("vendor", "")
    node["name"] = parsed.get("name", "")
    node["version"] = parsed.get("version", "")
    node["type"] = parsed.get("osType", "")
    node["arch"] = "x86_64"


inv_info["esx_systeminfo"] = {
    "inv_function": inv_esx_systeminfo,
}
