diff --git a/web/plugins/wato/inv_cisco_psirt.py b/web/plugins/wato/inv_cisco_psirt.py deleted file mode 100644 index 5674516f1ec3d9e680bba0698172a18a092482de..0000000000000000000000000000000000000000 --- a/web/plugins/wato/inv_cisco_psirt.py +++ /dev/null @@ -1,123 +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 : -# -# 2021-07-23: 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, - TextAscii, - ListChoice, - Integer, - Alternative, -) - -from cmk.gui.plugins.wato.inventory import ( - RulespecGroupInventory, -) - -_removecolumns_inv_cisco_psirt = [ - ('bugIDs', 'Cisco Bug IDs'), - ('firstFixed', 'First fixed in'), - ('firstPublished', 'First Published'), - ('installed_version', 'installed version'), - ('lastUpdated', 'Last Updated'), - ('publicationUrl', 'Public URL'), - ('summary', 'Summary'), - ('cwe', 'CWE'), - ('cves', 'CVEs'), - ('productNames', 'Product names'), - ('ipsSignatures', 'IPS signatures'), - ('iosRelease', 'IOS Releases'), - ('cvrfUrl', 'CVRF URL'), - ('ovalUrl', 'OVAL URL'), -] - - -def _valuespec_inv_cisco_psirt(): - return Dictionary( - title=_('Cisco PSIRT advisories'), - elements=[ - ('removecolumns', - ListChoice( - title=_('remove columns'), - help=_('remove information from report'), - choices=_removecolumns_inv_cisco_psirt, - default_value=[ - 'publicationUrl', - 'summary', - 'cwe', - 'cves', - 'productNames', - 'iosRelease', - 'ipsSignatures', - 'cvrfUrl', - 'ovalUrl', - ], - )), - ('psirt_type', - Alternative( - title=_('Cisco PSIRT advisory type'), - style='dropdown', - # default_value=True, - elements=[ - FixedValue( - 'IOS', - title=_('add Cisco PSIRT IOS security advisories'), - # tototext=_('Cisco PSIRT IOS security advisories info enabled'), - help=_('CMK will request Cisco IOS PSIRT security advisories'), - ), - FixedValue( - 'IOS-XE', - title=_('add Cisco PSIRT IOS-XE security advisories'), - # tototext=_('Cisco PSIRT IOS-XE security advisories info enabled'), - help=_('CMK will request Cisco IOS-XE PSIRT security advisories'), - ), - Dictionary( - title=_('add Cisco PSIRT advisories by base product id'), - elements=[ - ('product_family', - TextAscii( - title=_('product family'), - help=_('Product family for example: NEXUS, WSA, ESA or ASA'), - allow_empty=False, - size=24, - )), - ('not_updated', - Integer( - title=_('don\'t show advisories not updated for the last X days'), - default_value=730, - # allow_empty=False, - ) - ), - ('dont_show_older_then', - TextAscii( - title=_('don\'t show advisories from before YYYY-MM-DD'), - default_value='2000-01-01', - allow_empty=False, - )), - ]) - ] - )), - ]) - - -rulespec_registry.register( - HostRulespec( - group=RulespecGroupInventory, - match_type='dict', - name='inv_parameters:inv_cisco_psirt', - valuespec=_valuespec_inv_cisco_psirt, - ))