diff --git a/web/plugins/wato/cisco_vpn_tunnel.py b/web/plugins/wato/cisco_vpn_tunnel.py deleted file mode 100644 index c1875327c05c1a0b594eb33e0a5328630a2a0781..0000000000000000000000000000000000000000 --- a/web/plugins/wato/cisco_vpn_tunnel.py +++ /dev/null @@ -1,112 +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 : 2017-12-28 - -from cmk.gui.i18n import _ -from cmk.gui.valuespec import ( - Dictionary, - TextAscii, - Tuple, - MonitoringState, - ListOf, - IPv4Address, - TextUnicode, - FixedValue, -) - -from cmk.gui.plugins.wato import ( - CheckParameterRulespecWithItem, - rulespec_registry, - RulespecGroupCheckParametersNetworking, - RulespecGroupCheckParametersDiscovery, - HostRulespec, -) - - -def _parameter_valuespec_cisco_vpn_tunnel(): - return Dictionary( - elements=[ - ('tunnels', - ListOf( - Tuple( - title=_('VPN Tunnel Endpoints'), - elements=[ - IPv4Address( - title=_('Peer IP-Address'), - help=_('The configured value must match a tunnel reported by the monitored ' - 'device.'), - ), - TextUnicode( - title=_('Tunnel Alias'), - help=_('You can configure an individual alias here for the tunnel matching ' - 'the IP-Address or Name configured in the field above.'), - ), - MonitoringState( - default_value=2, - title=_('State if tunnel is not found'), - ), - MonitoringState( - default_value=1, - title=_('State if tunnel has no active IPSec SA'), - ), - ]), - add_label=_('Add tunnel'), - movable=False, - title=_('VPN tunnel specific configuration'), - )), - ('state', - MonitoringState( - title=_('Default state to report when tunnel can not be found anymore'), - help=_('Default state if a tunnel, which is not listed above in this rule, ' - 'can no longer be found.'), - default_value=2, - )), - ('missing_ipsec_sa_state', - MonitoringState( - title=_('Default state to report when tunnel has no active IPSec SA'), - help=_('Default state if a tunnel, which is not listed above in this rule, ' - 'has no active IPSec SA.'), - default_value=1, - )), - ], - ) - - -rulespec_registry.register( - CheckParameterRulespecWithItem( - check_group_name='cisco_vpn_tunnel', - group=RulespecGroupCheckParametersNetworking, - item_spec=lambda: TextAscii(title=_('IP-Address of Tunnel Endpoint'), ), - match_type='dict', - parameter_valuespec=_parameter_valuespec_cisco_vpn_tunnel, - title=lambda: _('Cisco VPN Tunnel'), - )) - - -def _valuespec_discovery_cisco_vpn_tunnel(): - return Dictionary( - title=_('VPN Tunnel discovery'), - elements=[( - 'discover_aggressive_mode', - FixedValue( - True, - default_value=False, - title=_('Discover aggressive mode VPN Tunnel'), - totext=_('Discover aggressive mode VPN Tunnel'), - ), - )], - ) - - -rulespec_registry.register( - HostRulespec( - group=RulespecGroupCheckParametersDiscovery, - match_type='dict', - name='discovery_cisco_vpn_tunnel', - valuespec=_valuespec_discovery_cisco_vpn_tunnel, - ))