fru: use ipmifruproperty for property lookup
The member IPMIFruData::property was unused and instead the property
lookup was performed with the phosphor-dbus-interface property name.
The IPMIFruData::property field is meant to map from dbus property to
FRU property to allow a variety of dbus mappings.
Tested: Verified the member was unused.
Tested: Verified that a configuration yaml mapping is respected and
ipmid will report the information expected given a FRU published to
dbus.
Note: The fields for IPMI FRU properties were taken from the example
YAML and are expected to be what was used by machines leveraging this
feature.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I44f73b67ecdeae2d772daa38cc21cc18cdf9c7ce
diff --git a/ipmi_fru_info_area.cpp b/ipmi_fru_info_area.cpp
index 47a8a8e..85d2007 100644
--- a/ipmi_fru_info_area.cpp
+++ b/ipmi_fru_info_area.cpp
@@ -13,12 +13,12 @@
using namespace phosphor::logging;
// Property variables
-static constexpr auto partNumber = "PartNumber";
-static constexpr auto serialNumber = "SerialNumber";
+static constexpr auto partNumber = "Part Number";
+static constexpr auto serialNumber = "Serial Number";
static constexpr auto manufacturer = "Manufacturer";
-static constexpr auto buildDate = "BuildDate";
+static constexpr auto buildDate = "Mfg Date";
static constexpr auto model = "Model";
-static constexpr auto prettyName = "PrettyName";
+static constexpr auto prettyName = "Name";
static constexpr auto version = "Version";
static constexpr auto type = "Type";
diff --git a/read_fru_data.cpp b/read_fru_data.cpp
index 1a1949d..327f552 100644
--- a/read_fru_data.cpp
+++ b/read_fru_data.cpp
@@ -138,8 +138,9 @@
if (iter != allProp.end())
{
data[properties.second.section].emplace(
- properties.first, std::move(std::get<std::string>(
- allProp[properties.first])));
+ properties.second.property,
+ std::move(
+ std::get<std::string>(allProp[properties.first])));
}
}
}