diff --git a/agent_based/inv_cisco_wlc_ap_cdp_cache.py b/agent_based/inv_cisco_wlc_ap_cdp_cache.py index dd2c0954cf6a2c3b6fb5a3e03e580344b4682cf0..deec16c45f6dcd0bf48022d925b330f503bcc917 100644 --- a/agent_based/inv_cisco_wlc_ap_cdp_cache.py +++ b/agent_based/inv_cisco_wlc_ap_cdp_cache.py @@ -1,5 +1,4 @@ -#!/usr/bin/python -# !/usr/bin/env python3 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # License: GNU General Public License v2 @@ -116,10 +115,16 @@ def parse_cisco_wlc_ap_cdp_cache(string_table: StringTable): def inventory_cisco_wlc_ap_cdp_cache(params, section) -> InventoryResult: - removecolumns = params['removecolumns'] - remove_domain = params['remove_domain'] - domain_name = params['domain_name'] - use_short_if_name = params['use_short_if_name'] + removecolumns = [] + remove_domain = False + domain_name = '' + use_short_if_name = False + + if params: + removecolumns = params.get('removecolumns', removecolumns) + remove_domain = params.get('remove_domain', remove_domain) + domain_name = params.get('domain_name', domain_name) + use_short_if_name = params.get('use_short_if_name', use_short_if_name) path = ['networking', 'wlan', 'controller', 'ap_cdp_cache'] @@ -174,11 +179,6 @@ register.snmp_section( register.inventory_plugin( name='inv_cisco_wlc_ap_cdp_cache', inventory_function=inventory_cisco_wlc_ap_cdp_cache, - inventory_default_parameters={ - 'removecolumns': [], - 'remove_domain': False, - 'domain_name': '', - 'use_short_if_name': False, - }, + inventory_default_parameters={}, inventory_ruleset_name='inv_cisco_wlc_ap_cdp_cache', ) diff --git a/inv_cisco_wlc_ap_cdp_cache.mkp b/inv_cisco_wlc_ap_cdp_cache.mkp index 716d934748dcd524b8bd41d071daba1edddb5b7a..87dbb51fabc8e3e2c286888cd84e33ef44a41c71 100644 Binary files a/inv_cisco_wlc_ap_cdp_cache.mkp and b/inv_cisco_wlc_ap_cdp_cache.mkp differ diff --git a/packages/inv_cisco_wlc_ap_cdp_cache b/packages/inv_cisco_wlc_ap_cdp_cache index da3236aee52c2652cbd58c63df1a1141cf916108..829889e934cafc124b8cb38528d517730f2e1a5f 100644 --- a/packages/inv_cisco_wlc_ap_cdp_cache +++ b/packages/inv_cisco_wlc_ap_cdp_cache @@ -1,4 +1,4 @@ -{'author': 'thl-cmk[at]outlook[dot]com', +{'author': 'Th.L. (thl-cmk[at]outlook[dot]com)', 'description': 'SNMP inventory for Cisco WLC AP CDP cache ' '(CISCO-LWAPP-CDP-MIB).\n' '\n'