From c70728579c006564f4b358e06cabfda465198f6e Mon Sep 17 00:00:00 2001 From: RekhaAparna01 Date: Fri, 11 Oct 2024 04:48:56 -0500 Subject: [PATCH] Populate "Functional" DBus property This commit adds code to populate Functional DBus property. This property indicates whether the FRU is functional or not. Signed-off-by: RekhaAparna01 --- src/worker.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/worker.cpp b/src/worker.cpp index 8decaebf..efa17840 100644 --- a/src/worker.cpp +++ b/src/worker.cpp @@ -780,6 +780,13 @@ bool Worker::primeInventory(const std::string& i_vpdFilePath) "xyz.openbmc_project.Inventory.Item", move(l_propertyValueMap)); + types::PropertyMap l_propertyMap; + l_propertyMap.emplace("Functional", true); + vpdSpecificUtility::insertOrMerge( + l_interfaces, + "xyz.openbmc_project.State.Decorator.OperationalStatus", + move(l_propertyMap)); + if (l_Fru.value("inherit", true) && m_parsedJson.contains("commonInterfaces")) { @@ -994,6 +1001,13 @@ void Worker::populateDbus(const types::VPDMapVariant& parsedVpdMap, processEmbeddedAndSynthesizedFrus(aFru, interfaces); } + types::PropertyMap l_propertyMap; + l_propertyMap.emplace("Functional", true); + vpdSpecificUtility::insertOrMerge( + interfaces, + "xyz.openbmc_project.State.Decorator.OperationalStatus", + move(l_propertyMap)); + objectInterfaceMap.emplace(std::move(fruObjectPath), std::move(interfaces)); }