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 <cert-name>"
PASS: Generate a expired alarm on a certificate and verity that
      alarm reason text shows
      "system certificate-show <cert-name>"

Story: 2010848
Task: 48474

Change-Id: If7352ad42c5f76a4950c45addf36377398107f41
Signed-off-by: amantri <ayyappa.mantri@windriver.com>
This commit is contained in:
amantri 2024-04-12 10:16:52 -04:00
parent 82c95f934e
commit 1d9f613fa4
1 changed files with 1 additions and 2 deletions

View File

@ -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]))