diff --git a/bin/ciscoapi/cisco-bug.py b/bin/ciscoapi/cisco-bug.py index fc312c435aa46a0aed92e47d870b6632dd1232fb..bca0cb378c213b5b0a81de5e1e74751a3cab9a62 100755 --- a/bin/ciscoapi/cisco-bug.py +++ b/bin/ciscoapi/cisco-bug.py @@ -124,7 +124,7 @@ def main(): status_code = int(entry.get('status_code', 200)) log_message(f'bug return:PID: {pid}, Status: {status_code}, Version: {software_releases}') path = expand_path(path_found + pid.replace('/', '_')) - # check if there where was an error, if so go to next pid + # check if there were was an error, if so go to next pid if status_code == 200: bugs = entry.get('bugs', None) if bugs: # if new/changed bugs found diff --git a/bin/ciscoapi/cisco-eox.py b/bin/ciscoapi/cisco-eox.py index e5b8f7c979cc9f7f8337ffd2376400205a9cdada..b59cae73ae8f1cf519cf8ffc8e809d5c861dd466 100755 --- a/bin/ciscoapi/cisco-eox.py +++ b/bin/ciscoapi/cisco-eox.py @@ -83,9 +83,10 @@ def save_eox(eox, path): if EOLProductID == '': EOLProductID = PID.get('EOXInputValue') - with open(path + (EOLProductID.replace('/', '_')), 'w') as f: - json.dump(PID, f) - saved.append(EOLProductID) + if EOLProductID: + with open(path + (EOLProductID.replace('/', '_')), 'w') as f: + json.dump(PID, f) + saved.append(EOLProductID) return saved @@ -105,7 +106,7 @@ def save_serials(eox, path): for serial in eox: EOXInputValue = serial.get('EOXInputValue') - if EOXInputValue != '': + if EOXInputValue: with open(path + EOXInputValue, 'w') as f: json.dump(serial, f) saved.append(EOXInputValue) diff --git a/bin/ciscoapi/cisco-sn2info.py b/bin/ciscoapi/cisco-sn2info.py index f7c69459a1c7ea14193f45305577c4aceea4640a..6521bd5b615f4207ee6c6d52707b9d5315c5d245 100755 --- a/bin/ciscoapi/cisco-sn2info.py +++ b/bin/ciscoapi/cisco-sn2info.py @@ -59,7 +59,7 @@ def sn2info_save_serials(sn2infos, path): for sn2info in sn2infos: serial = str(sn2info.get('sr_no')) - if serial != '': + if serial: with open(path + serial, 'w') as f: json.dump(sn2info, f) saved.append(serial) diff --git a/gui/views/inv_cisco_livecycle.py b/gui/views/inv_cisco_livecycle.py index 9be8672231b910a9c54e3a2bf409b18588d56a82..b03854ea4afd52cb47620155c106f479b46f8b7e 100644 --- a/gui/views/inv_cisco_livecycle.py +++ b/gui/views/inv_cisco_livecycle.py @@ -34,7 +34,10 @@ from cmk.gui.utils.html import HTML # to get the status colors and the clickable IDs for EOL, PSIRT and Bug you need to copy the file # ~/lib/check_mk/gui/plugins/views/inventory.py to ~/local/lib/check_mk/gui/plugins/views. # Then change the value of ENABLE_PAINTERS to True and restart the apache service (omd restart apache) - +# +# in cmk 2.2.0 this work around don't work anymore. @decorate_inv_paint() was moved +# to ~/lib/check_mk/gui/views/inventory/__init__.py +# ENABLE_PAINTERS = False # ################################################################################# diff --git a/mkp/inv_cisco_support-0.2.1-20231024.mkp b/mkp/inv_cisco_support-0.2.1-20231024.mkp index 8a6f3e2ba5803a1b0ade1e4bd07bc4656ca67e82..af115ba73b559ca960b211a98990bdc4580a230a 100644 Binary files a/mkp/inv_cisco_support-0.2.1-20231024.mkp and b/mkp/inv_cisco_support-0.2.1-20231024.mkp differ