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

#
# parse function with the following output:
# {
#    'VersionOS': '74.06.05',
#    'VersionDevice': 'AVM FRITZ!Box Fon WLAN 7270 v3',
#    ...
# }
#


def inv_fritz(parsed):

    node_hw = inv_tree('hardware.system.')
    node_hw['model'] = parsed.get('VersionDevice')
    node_sw = inv_tree('software.os.')
    node_sw['version'] = parsed.get('VersionOS')


inv_info['fritz'] = {
    "inv_function": inv_fritz,
}
