From 1d9f613fa4e9eb7855edbac58c9ffeb8a2431e80 Mon Sep 17 00:00:00 2001 From: amantri Date: Fri, 12 Apr 2024 10:16:52 -0400 Subject: [PATCH] Change alarm reason text The system certificate-show with uuid is deprecated, the alarms which are expiring/expired still shows deprecated command, this fix changes the reason text of the alarm. Test Cases: PASS: Generate a expiring alarm on a certificate and verify that alarm reason text shows "system certificate-show " PASS: Generate a expired alarm on a certificate and verity that alarm reason text shows "system certificate-show " Story: 2010848 Task: 48474 Change-Id: If7352ad42c5f76a4950c45addf36377398107f41 Signed-off-by: amantri --- sysinv/sysinv/sysinv/sysinv/cert_alarm/fm.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/cert_alarm/fm.py b/sysinv/sysinv/sysinv/sysinv/cert_alarm/fm.py index d6e33bb1ac..de1cc3d84a 100644 --- a/sysinv/sysinv/sysinv/sysinv/cert_alarm/fm.py +++ b/sysinv/sysinv/sysinv/sysinv/cert_alarm/fm.py @@ -60,8 +60,7 @@ class FaultApiMgr(object): txt.append("Certificate ") if snapshot[utils.SNAPSHOT_KEY_MODE] is utils.UUID: - txt.append("\'system certificate-show %s\' (mode=%s) " % - (snapshot[utils.UUID], utils.get_mode(cert_name))) + txt.append("\'system certificate-show %s\' " % (cert_name)) elif snapshot[utils.SNAPSHOT_KEY_MODE] is utils.MODE_CERT_MGR: txt.append("namespace=%s, certificate=%s " % (snapshot[utils.SNAPSHOT_KEY_k8s_ns], snapshot[utils.SNAPSHOT_KEY_k8s_cert]))