summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikram Bodireddy <vikram.bodireddy@linux.intel.com>2019-12-05 12:16:57 +0530
committerVikram B <vikram.bodireddy@linux.intel.com>2019-12-06 18:44:52 +0000
commit91fe97c521d323fb5dfecade77a8548f7d1a01c1 (patch)
treebda41d0158e91ed7544d4e4d9add875fdc886797
parent900f949773795141266271107219ea019f2839cd (diff)
downloadbmcweb-91fe97c521d323fb5dfecade77a8548f7d1a01c1.tar.gz
bmcweb-91fe97c521d323fb5dfecade77a8548f7d1a01c1.zip
Adding StandBySpare state for firmware inventory
Added new state 'StandBySpare' for firmware inventory objects. With this change firmware inventory ["Status"]["State"] will be set to "StandBySpare" if the inventory item is BackUp/Recovery image. Tested: - Did the GET on "/redfish/v1/UpdateService/FirmwareInventory/<backup image>" Response: .... "Status": { "Health": "OK", "HealthRollup": "OK", "State": "StandbySpare" } ..... - Verifed GET on other inventory and works fine - Successfully ran the Redfish validator. Change-Id: I7094bb3a60a7fb8dc6564ee1d7a67480249423ac Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
-rw-r--r--redfish-core/include/utils/fw_utils.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/redfish-core/include/utils/fw_utils.hpp b/redfish-core/include/utils/fw_utils.hpp
index 296c900..7043291 100644
--- a/redfish-core/include/utils/fw_utils.hpp
+++ b/redfish-core/include/utils/fw_utils.hpp
@@ -207,6 +207,11 @@ std::string getRedfishFWState(const std::string &fwState)
{
return "Updating";
}
+ else if (fwState ==
+ "xyz.openbmc_project.Software.Activation.Activations.StandbySpare")
+ {
+ return "StandbySpare";
+ }
else
{
BMCWEB_LOG_DEBUG << "Default fw state " << fwState << " to Disabled";
OpenPOWER on IntegriCloud