Skip to content

Commit

Permalink
Populate "Functional" DBus property
Browse files Browse the repository at this point in the history
This commit adds code to populate Functional DBus property. This
property indicates whether the FRU is functional or not.

Signed-off-by: RekhaAparna01 <[email protected]>
  • Loading branch information
RekhaAparna01 committed Oct 11, 2024
1 parent 92a406a commit c707285
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
{
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit c707285

Please sign in to comment.