From 77a2b54064f846c45679bd36f9047e4ee1a64a13 Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy Date: Thu, 5 Dec 2019 10:58:37 +0530 Subject: 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 --- intel-pfr-manager/service/src/pfr_mgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intel-pfr-manager/service/src/pfr_mgr.cpp b/intel-pfr-manager/service/src/pfr_mgr.cpp index d5f1f59..318abe2 100644 --- a/intel-pfr-manager/service/src/pfr_mgr.cpp +++ b/intel-pfr-manager/service/src/pfr_mgr.cpp @@ -60,7 +60,10 @@ PfrVersion::PfrVersion(sdbusplus::asio::object_server &srv_, * 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( -- cgit v1.2.3