summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-07-25 15:03:19 -0700
committerPatrick Venture <venture@google.com>2019-08-01 18:33:06 +0000
commit45e93cbae0aa0d0f5385d40f5685b23e18f95351 (patch)
tree4e2e2be000e68da682424f70ab87d010dd7726e6
parentc86045cb7798797738d7702e132454640b27efb6 (diff)
downloadphosphor-host-ipmid-45e93cbae0aa0d0f5385d40f5685b23e18f95351.tar.gz
phosphor-host-ipmid-45e93cbae0aa0d0f5385d40f5685b23e18f95351.zip
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
-rw-r--r--ipmi_fru_info_area.cpp8
-rw-r--r--read_fru_data.cpp5
2 files changed, 7 insertions, 6 deletions
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 @@ namespace fru
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 @@ FruInventoryData readDataFromInventory(const FRUId& fruNum)
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])));
}
}
}
OpenPOWER on IntegriCloud