diff --git a/cisco_flash.mkp b/cisco_flash.mkp index a4359b983b4eebd22e221be84c3530d20fe9829c..03216bd3d176ddaac49f9f0f7a47d8f3cefc7450 100644 Binary files a/cisco_flash.mkp and b/cisco_flash.mkp differ diff --git a/packages/cisco_flash b/packages/cisco_flash index f34666b53bf98357e83f69f4724d77c3945c1616..4389a03f8f3c23d2e1e3947a308b4e694ae96b06 100644 --- a/packages/cisco_flash +++ b/packages/cisco_flash @@ -1,23 +1,15 @@ -{'author': 'Th.L. (thl-cmk[at]outlook[dot]com)', - 'description': 'Cisco flash plugins:\n - snmp_cisco_flash: inventory plugin for Cisco flash memory\n - cisco_flash: check for Cisco partitions\n', +{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)', + 'description': u'Cisco flash plugins:\n - snmp_cisco_flash: inventory plugin for Cisco flash memory\n - cisco_flash: check for Cisco partitions\n\n- 2020-05-13: added support for CMK1.6x\n', 'download_url': 'https://thl-cmk.hopto.org', - 'files': {'agents': [], - 'bin': [], - 'checkman': [], - 'checks': ['cisco_flash'], - 'doc': [], + 'files': {'checks': ['cisco_flash'], 'inventory': ['snmp_cisco_flash'], - 'lib': [], - 'mibs': [], - 'notifications': [], - 'pnp-templates': [], 'web': ['plugins/metrics/cisco_flash.py', 'plugins/views/inv_cisco_flash.py', 'plugins/wato/cisco_flash.py', 'plugins/wato/inv_cisco_flash.py']}, 'name': 'cisco_flash', 'num_files': 6, - 'title': 'Cisco flash plugins', - 'version': '20191104v.0.2b', + 'title': u'Cisco flash plugins', + 'version': '20200513v.0.2c', 'version.min_required': '1.4.0p35', - 'version.packaged': '1.4.0p35'} \ No newline at end of file + 'version.packaged': '1.6.0p8'} \ No newline at end of file diff --git a/web/plugins/views/inv_cisco_flash.py b/web/plugins/views/inv_cisco_flash.py index 39ab215ae1c9f8314c0fdf75f075a904eefe743d..631c20bd6fe8acd445c07eb4e8f614c66864c8ed 100644 --- a/web/plugins/views/inv_cisco_flash.py +++ b/web/plugins/views/inv_cisco_flash.py @@ -1,6 +1,14 @@ #!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- +try: + from cmk.gui.plugins.views.inventory import ( + declare_invtable_view, + render_inv_dicttable, + ) +except: + pass + inventory_displayhints.update({ '.hardware.components.flash.devices:': {'title': _('Flash devices'), 'render': render_inv_dicttable, 'keyorder': ['index', 'name', 'description', 'size', ], @@ -22,7 +30,7 @@ inventory_displayhints.update({ '.hardware.components.flash.devices:*.nameextended' : {'title': _('Name extended'), }, - '.hardware.components.flash.chips:': {'title': _('Flash chips'), 'render': render_inv_dicttable, + '.hardware.components.flash.chips:': {'title': _('Flash chips'), 'render' : render_inv_dicttable, 'keyorder': ['flashindex', 'index', 'description', ], 'view': 'invflashchips_of_host', }, @@ -36,7 +44,7 @@ inventory_displayhints.update({ '.hardware.components.flash.chips:*.maxwriteretries': {'title': _('max. write retries'), }, '.hardware.components.flash.chips:*.maxeraseretries': {'title': _('max. erasure retries'), }, - '.hardware.components.flash.partitions:': {'title': _('Flash partitions'), 'render': render_inv_dicttable, + '.hardware.components.flash.partitions:': {'title': _('Flash partitions'), 'render' : render_inv_dicttable, 'keyorder': ['flashindex', 'index', 'name', 'size', 'freespace', 'filecount', ], 'view': 'invflashpartitions_of_host', },