functions: Parse json file to set bios attr table
The elements.json file have entries as follow:
"lids": [
{
"element_name": "HBD.RAINIER_2U_XML",
"short_lid_name": "81e00630",
},
{
"element_name": "HBD.RAINIER_2U_XML.iplTime",
"short_lid_name": "81e0068d",
},
{
"element_name": "NVRAM.P10",
"short_lid_name": "81e0066b",
},
{
"element_name": "HDAT.RAINIER_4U_XML",
"short_lid_name": "81e00675",
},
Need to parse the element name and lid name depending on the system. The
.P10 files are common to all P10 systems, the .<system> applies only to
the system name provided by Entity Manager. The .iplTIme takes
precedence and should be the lid number that it's picked up, so use []
instead of insert to overwrite an entry if it had already being set.
In the example above, the string for a rainier 2U should look like:
HBD=81e0068d,NVRAM=81e0066b.
Change-Id: I55b317ffef6a7fbe3fd5ee92e7f0188d831b7972
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/functions.hpp b/functions.hpp
index b364393..bd4007d 100644
--- a/functions.hpp
+++ b/functions.hpp
@@ -48,6 +48,6 @@
std::shared_ptr<void>
updateBiosAttrTable(sdbusplus::bus::bus&,
std::map<std::string, std::vector<std::string>>,
- sdeventplus::Event&);
+ std::filesystem::path, sdeventplus::Event&);
} // namespace process_hostfirmware
} // namespace functions