Support XYZ interface for Location code
Update xyz interface for Location code in ibm-read-parser and vpd-manager
along with com.ibm.path for Location code.
Test Result-
busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard| grep -e "Location" -e "FC" -e "SE"
com.ibm.ipzvpd.Location interface - - -
.LocationCode property s "U78DA.ND1.WZS004K-P0" emits-change writable
.FC property ay 8 65 65 68 65 45 48 48 49 emits-change writable
.SE property ay 7 68 68 83 48 48 52 75 emits-change writable
.SE property ay 7 49 51 57 70 50 66 48 emits-change writable
xyz.openbmc_project.Inventory.Decorator.LocationCode interface - - -
.LocationCode property s "UAADA.ND0.DDS004K-P0" emits-change writable
Below write command should trigger the LC update for motherboard and other dependent FRUs.
busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager WriteKeyword ossay "/system/chassis/motherboard" "VCEN" "FC" 2 55 56
busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager WriteKeyword ossay "/system/chassis/motherboard" "VCEN" "SE" 2 87 90
busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard| grep -e "Location" -e "FC" -e "SE"
com.ibm.ipzvpd.Location interface - - -
.LocationCode property s "U78DA.ND0.WZS004K-P0" emits-change writable
.FC property ay 8 55 56 68 65 45 48 48 49 emits-change writable
.SE property ay 7 87 90 83 48 48 52 75 emits-change writable
.SE property ay 7 49 51 57 70 50 66 48 emits-change writable
xyz.openbmc_project.Inventory.Decorator.LocationCode interface - - -
.LocationCode property s "U78DA.ND0.WZS004K-P0" emits-change writable
busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0| grep -e "Location" -e "FC" -e "SE"
com.ibm.ipzvpd.Location interface - - -
.LocationCode property s "U78DA.ND0.WZS004K-P0-C15" emits-change writable
xyz.openbmc_project.Inventory.Decorator.LocationCode interface - - -
.LocationCode property s "U78DA.ND0.WZS004K-P0-C15" emits-change writable
Change-Id: If8715b8cafcc87d8a46e7083f90f162c5ad4a6b0
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index fed83ad..a678adb 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -207,11 +207,13 @@
if constexpr (is_same<T, Parsed>::value)
{
if (busProp == "LocationCode" &&
- inf == "com.ibm.ipzvpd.Location")
+ inf == IBM_LOCATION_CODE_INF)
{
+ // TODO deprecate the com.ibm interface later
auto prop = expandLocationCode(
itr.value().get<string>(), vpdMap, isSystemVpd);
props.emplace(busProp, prop);
+ interfaces.emplace(XYZ_LOCATION_CODE_INF, props);
}
else
{
@@ -443,8 +445,7 @@
for (const auto& eI : itemEEPROM["extraInterfaces"].items())
{
inventory::PropertyMap props;
- if (eI.key() ==
- openpower::vpd::constants::LOCATION_CODE_INF)
+ if (eI.key() == IBM_LOCATION_CODE_INF)
{
if constexpr (std::is_same<T, Parsed>::value)
{