diff options
author | Vikram Bodireddy <vikram.bodireddy@linux.intel.com> | 2019-12-05 09:46:57 +0300 |
---|---|---|
committer | Vikram B <vikram.bodireddy@linux.intel.com> | 2019-12-06 21:44:52 +0300 |
commit | 91fe97c521d323fb5dfecade77a8548f7d1a01c1 (patch) | |
tree | bda41d0158e91ed7544d4e4d9add875fdc886797 | |
parent | 900f949773795141266271107219ea019f2839cd (diff) | |
download | bmcweb-91fe97c521d323fb5dfecade77a8548f7d1a01c1.tar.xz |
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.hpp | 5 |
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 296c900da2..7043291429 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"; |