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/vpd-manager/manager.cpp b/vpd-manager/manager.cpp
index 42b1bbd..829dce8 100644
--- a/vpd-manager/manager.cpp
+++ b/vpd-manager/manager.cpp
@@ -87,11 +87,11 @@
.get_ref<const nlohmann::json::string_t&>(),
std::make_pair(itemFRUS.key(), isMotherboard));
- if (itemEEPROM["extraInterfaces"].find(LOCATION_CODE_INF) !=
+ if (itemEEPROM["extraInterfaces"].find(IBM_LOCATION_CODE_INF) !=
itemEEPROM["extraInterfaces"].end())
{
fruLocationCode.emplace(
- itemEEPROM["extraInterfaces"][LOCATION_CODE_INF]
+ itemEEPROM["extraInterfaces"][IBM_LOCATION_CODE_INF]
["LocationCode"]
.get_ref<const nlohmann::json::string_t&>(),
itemEEPROM["inventoryPath"]