Adding Activation for associated Version interface
Activation interface should be associated with Version
interface to represents the activation state. Its missed
in initial commit and causing redfish query failing for
these Software Objects.
Tested:
Validated the redfish response by using below request URI
URI: /redfish/v1/UpdateService/FirmwareInventory/cpld
METHOD: GET
Change-Id: Ifb3fa779ddbbac2cfee12ec7d3cb0093fd87089f
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/service/src/pfr_mgr.cpp b/service/src/pfr_mgr.cpp
index 91a9504..3fbbe36 100644
--- a/service/src/pfr_mgr.cpp
+++ b/service/src/pfr_mgr.cpp
@@ -75,6 +75,21 @@
iface->register_property("Version", version);
iface->initialize();
+
+ /* Activation interface represents activation state for an associated
+ * xyz.openbmc_project.Software.Version. since these versions are already
+ * active, so we should set "activation" to Active and
+ * "RequestedActivation" to None. */
+ std::string activation =
+ "xyz.openbmc_project.Software.Activation.Activations.Active";
+ std::string reqActNone =
+ "xyz.openbmc_project.Software.Activation.RequestedActivations.None";
+ auto activationIface = server.add_interface(
+ objPath, "xyz.openbmc_project.Software.Activation");
+ activationIface->register_property("Activation", activation);
+ activationIface->register_property("RequestedActivation", reqActNone);
+
+ activationIface->initialize();
}
bool PfrConfig::getPFRProvisionedState()