From 32578dc4161d33a55745041c93449312726bfaec Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Sun, 18 Jun 2023 18:03:59 +0000 Subject: [PATCH] Delete checkpoint_vsx_system.py --- gui/wato/checkpoint_vsx_system.py | 131 ------------------------------ 1 file changed, 131 deletions(-) delete mode 100644 gui/wato/checkpoint_vsx_system.py diff --git a/gui/wato/checkpoint_vsx_system.py b/gui/wato/checkpoint_vsx_system.py deleted file mode 100644 index 2f1e6d3..0000000 --- a/gui/wato/checkpoint_vsx_system.py +++ /dev/null @@ -1,131 +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-09-07 -# -from cmk.gui.i18n import _ -from cmk.gui.valuespec import ( - Dictionary, - TextAscii, - Tuple, - Integer, - MonitoringState, - ListChoice, - TextUnicode, -) - -from cmk.gui.plugins.wato.utils import ( - CheckParameterRulespecWithItem, - rulespec_registry, - RulespecGroupCheckParametersNetworking, - RulespecGroupCheckParametersDiscovery, - HostRulespec, -) - - -def _parameter_valuespec_checkpoint_vsx_system(): - return Dictionary( - elements=[ - ('levels_upper_absolute', - Tuple( - title=_('Maximum number of firewall connections'), - help=_('This rule sets upper limits to the current number of connections through ' - 'a Checkpoint firewall.'), - elements=[ - Integer(title=_('Warning at'), minvalue=0, unit=_('connections')), - Integer(title=_('Critical at'), minvalue=0, unit=_('connections')), - ])), - ('levels_lower_absolute', - Tuple( - title=_('Minimum number of firewall connections'), - help=_('This rule sets lower limits to the current number of connections through ' - 'a Checkpoint firewall.'), - elements=[ - Integer(title=_('Warning blow'), minvalue=0, unit=_('connections')), - Integer(title=_('Critical below'), minvalue=0, unit=_('connections')), - ])), - ('state_sic_not_established', - MonitoringState( - title=_('State if SIC is not established'), - help=_('Monitoring state if SIC is not established'), - default_value=2, - )), - ('state_ha_not_act_stb', - MonitoringState( - title=_('State if H/A state not active/standby'), - help=_('Monitoring state if H/A state not active or standby'), - default_value=2, - )), - ('state_policy_not_installed', - MonitoringState( - title=_('State if no policy is installed'), - help=_('Monitoring state if no policy is installed'), - default_value=2, - )), - ('state_policy_changed', - MonitoringState( - title=_('State on policy name change'), - help=_('Monitoring status on policy name change'), - default_value=1, - )), - ('state_ha_changed', - MonitoringState( - title=_('State on H/A state change'), - help=_('Monitoring status on H/A state change'), - default_value=1, - )), - ('policyname', # added by plugin discovery function - TextUnicode()), - ('ha_state', # added by plugin discovery function - TextUnicode()), - ], - hidden_keys=['policyname', 'ha_state'], - ) - - -rulespec_registry.register( - CheckParameterRulespecWithItem( - check_group_name='checkpoint_vsx_system', - group=RulespecGroupCheckParametersNetworking, - match_type='dict', - parameter_valuespec=_parameter_valuespec_checkpoint_vsx_system, - title=lambda: _('Check Point VSX system'), - item_spec=lambda: TextAscii(title=_('VSX System name'), ), - )) - - -def _valuespec_discovery_checkpoint_vsx_system(): - _vs_types = [ - ('virtual system', 'Virtual System'), - ('vsx gateway', 'VSX Gateway'), - ('virtual switch', 'Virtual Switch'), - ('virtual router', 'Virtual Router'), - ] - return Dictionary( - title=_('Check Point VSX system'), - elements=[ - ('vs_type', - ListChoice( - title=_('VS types to discover'), - help=_('Virtual system types to discover. Note: if you select "VSX Gateway", ' - 'this will also discover ClusterXL systems.'), - choices=_vs_types, - default_value=[ - 'virtual system', - ], - )), - ], - ) - - -rulespec_registry.register( - HostRulespec( - group=RulespecGroupCheckParametersDiscovery, - match_type='dict', - name='discovery_checkpoint_vsx_system', - valuespec=_valuespec_discovery_checkpoint_vsx_system, - )) -- GitLab