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/test/vpd-manager-test/reader_test.cpp b/test/vpd-manager-test/reader_test.cpp
index b6cf80c..58d8d2f 100644
--- a/test/vpd-manager-test/reader_test.cpp
+++ b/test/vpd-manager-test/reader_test.cpp
@@ -65,8 +65,9 @@
for (const auto& itemEEPROM : groupEEPROM)
{
fruLocationCode.emplace(
- itemEEPROM["extraInterfaces"][LOCATION_CODE_INF]["LocationCode"]
- .get_ref<const nlohmann::json::string_t&>(),
+ itemEEPROM["extraInterfaces"][IBM_LOCATION_CODE_INF]
+ ["LocationCode"]
+ .get_ref<const nlohmann::json::string_t&>(),
itemEEPROM["inventoryPath"]
.get_ref<const nlohmann::json::string_t&>());
}
@@ -109,8 +110,8 @@
{
// mock the call to read bus property
MockUtilCalls uCalls;
- EXPECT_CALL(uCalls, readBusProperty("/system/chassis/motherboard",
- LOCATION_CODE_INF, "LocationCode"))
+ EXPECT_CALL(uCalls, readBusProperty(SYSTEM_OBJECT, IBM_LOCATION_CODE_INF,
+ "LocationCode"))
.Times(1)
.WillOnce(testing::Return("U78DA.ND1.1234567-P0"));