Expose recovery img state as StandbySpare
In order to differentiate the recovery & active image,
StandbySpare or Active value will be advertised accordingly
by the inventory objects.
Tested:
1. Verified that BMC / BIOS active or recovery image
advertise the changes as Active / StandbySpare for the
Activation state
2. With changes in bmcweb, the same will be marked
as enabled / StandbySpare in the redfish schema query
for the State property
Change-Id: I511013c0f9e343a6b40607095057f889cd33e2af
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
diff --git a/service/src/pfr_mgr.cpp b/service/src/pfr_mgr.cpp
index d5f1f59..318abe2 100644
--- a/service/src/pfr_mgr.cpp
+++ b/service/src/pfr_mgr.cpp
@@ -60,7 +60,10 @@
* active, so we should set "activation" to Active and
* "RequestedActivation" to None. */
std::string activation =
- "xyz.openbmc_project.Software.Activation.Activations.Active";
+ (imgType == ImageType::bmcRecovery ||
+ imgType == ImageType::biosRecovery)
+ ? "xyz.openbmc_project.Software.Activation.Activations.StandbySpare"
+ : "xyz.openbmc_project.Software.Activation.Activations.Active";
std::string reqActNone =
"xyz.openbmc_project.Software.Activation.RequestedActivations.None";
auto activationIface = server.add_interface(