diff --git a/web/plugins/wato/inv_cisco_flash.py b/web/plugins/wato/inv_cisco_flash.py deleted file mode 100644 index fbb73ba2377c6f8784b6ed11f1751633de3b85d4..0000000000000000000000000000000000000000 --- a/web/plugins/wato/inv_cisco_flash.py +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# License: GNU General Public License v2 - -# Author: thl-cmk[at]outlook[dot]com -# URL : https://thl-cmk.hopto.org -# Date : 2019-10-28 -# -# Cisco flash metrics plugin -# -# change log -# 2019-10-28: initial release -# 2021-07-31: rewritten for CMK 2.0 - - -from cmk.gui.i18n import _ -from cmk.gui.plugins.wato import ( - HostRulespec, - rulespec_registry, -) -from cmk.gui.valuespec import ( - Dictionary, - FixedValue, - ListChoice, -) - -from cmk.gui.plugins.wato.inventory import ( - RulespecGroupInventory, -) - -_inv_cisco_flash_cflDeviceRemovecolumns = [ - ('minpartitionsize', 'min. partition size (MB)'), - ('maxprtitions', 'max. partitions'), - ('chipcount', 'Chip count'), - ('controller', 'Controller'), - ('programmingjumper', 'Programming jumper'), - ('inittime', 'Init time'), - ('removable', 'Removable'), - ('physentindex', 'Phys entity index'), - ('nameextended', 'Name extended'), -] - -_inv_cisco_flash_cflPartitionRemovecolumns = [ - ('startchip', 'Start chip'), - ('endchip', 'End chip'), - ('crcsumalgo', 'Checksumm algorithm'), - ('status', 'Status'), - ('upgrademethod', 'Upgrade method'), - ('neederasure', 'Need erasure'), - ('filenamelength', 'File name length'), - ('lowspacenotifythreshold', 'Low space notify threshold (%)'), -] - -_inv_cisco_flash_cflChipRemovecolumns = [ - ('code', 'Code'), - ('writeretries', 'Write retries'), - ('eraseretries', 'Erase retries'), - ('maxwriteretries', 'max. write retries'), - ('maxeraseretries', 'max. erasure retries'), -] - - -def _valuespec_inv_cisco_flash(): - return Dictionary( - title=_('Cisco flash inventory'), - elements=[ - ('cflDeviceDisable', - FixedValue( - True, - title=_('disable Flash device inventory'), - )), - ('cflPartitionDisable', - FixedValue( - True, - title=_('disable Flash partition inventory'), - )), - ('cflChipDisable', - FixedValue( - True, - title=_('disable Flash chips inventory'), - )), - ('cflDeviceRemovecolumns', - ListChoice( - title=_('list of columns to remove from flash devices'), - help=_('information to remove from inventory'), - choices=_inv_cisco_flash_cflDeviceRemovecolumns, - default_value=[ - 'chipcount', - 'controller', - 'programmingjumper', - 'inittime', - 'physentindex', - 'nameextended', - ], - )), - ('cflPartitionRemovecolumns', - ListChoice( - title=_('list of columns to remove from flash partitions'), - help=_('information to remove from inventory'), - choices=_inv_cisco_flash_cflPartitionRemovecolumns, - default_value=[ - 'startchip', - 'endchip', - ], - )), - ('cflChipRemovecolumns', - ListChoice( - title=_('list of columns to remove from flash chips'), - help=_('information to remove from inventory'), - choices=_inv_cisco_flash_cflChipRemovecolumns, - default_value=[ - 'code', - 'writeretries', - 'eraseretries', - 'maxwriteretries', - 'maxeraseretries' - ], - )), - ], - ) - - -rulespec_registry.register( - HostRulespec( - group=RulespecGroupInventory, - match_type='dict', - name='inv_parameters:inv_cisco_flash', - valuespec=_valuespec_inv_cisco_flash, - ))