From 4f7d82308f5f7c663223344873f8b392a1311d82 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Thu, 11 Mar 2021 11:13:59 -0500 Subject: [PATCH] Add NonRecoverable property to Hardware Monitor's Redfish This update adds 'NonRecoverable' sensor health property to the Hardware Monitor's Redfish platform management protocol support. Test Plan: PASS: Verify handling of Redfish NonRecoverable sensor ... using redfish ... switching between ipmi and redfish and back PASS: Verify sensor model relearn over change of bmc protocol Regression: PASS: Verify sensor model relearn by command PASS: Verify sensor suppression PASS: Verify sensor alarm and degrade management ... as sensor events come and go ... on sensor suppression and unsuppression PASS: Verify sensor monitoring regression test PASS: Verify update as a patch (apply/remove) Change-Id: I2770e63f4d44e269b4410f392707f3cd01e9a2cc Closes-Bug: 1918152 Signed-off-by: Eric MacDonald --- mtce/src/hwmon/hwmonThreads.cpp | 4 ++++ mtce/src/hwmon/hwmonThreads.h | 1 + 2 files changed, 5 insertions(+) diff --git a/mtce/src/hwmon/hwmonThreads.cpp b/mtce/src/hwmon/hwmonThreads.cpp index f5305050..a572ce4c 100644 --- a/mtce/src/hwmon/hwmonThreads.cpp +++ b/mtce/src/hwmon/hwmonThreads.cpp @@ -964,6 +964,10 @@ static int _parse_redfish_sensor_data( char * json_str_ptr, thread_info_type * i { strcpy(_sample_list[samples].status, "cr"); } + else if (!strcmp (health.data(), REDFISH_SEVERITY__NONRECOVERABLE )) + { + strcpy(_sample_list[samples].status, "nr"); + } else { strcpy(_sample_list[samples].status, "na"); diff --git a/mtce/src/hwmon/hwmonThreads.h b/mtce/src/hwmon/hwmonThreads.h index f215cca8..2e5a0a3a 100644 --- a/mtce/src/hwmon/hwmonThreads.h +++ b/mtce/src/hwmon/hwmonThreads.h @@ -33,6 +33,7 @@ #define REDFISH_SEVERITY__GOOD "OK" #define REDFISH_SEVERITY__MAJOR "Warning" #define REDFISH_SEVERITY__CRITICAL "Critical" +#define REDFISH_SEVERITY__NONRECOVERABLE "NonRecoverable" #define BMC_SENSOR_DEFAULT_UNIT_TYPE_TEMP "degrees" #define BMC_SENSOR_DEFAULT_UNIT_TYPE_VOLT "Volts"