regulators: Enhance config file parser

Enhance JSON config file parser to convert relative inventory paths to
absolute form.

Tested:
Run local CI with -Dlong-tests=enabled to enable tests for
validate-regulators-config.py.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I80237a673f9c5918898db15363847722141388e6
diff --git a/phosphor-regulators/test/actions/action_environment_tests.cpp b/phosphor-regulators/test/actions/action_environment_tests.cpp
index 4100078..54afc2e 100644
--- a/phosphor-regulators/test/actions/action_environment_tests.cpp
+++ b/phosphor-regulators/test/actions/action_environment_tests.cpp
@@ -40,8 +40,10 @@
     // Create Device and add to IDMap
     std::unique_ptr<i2c::I2CInterface> i2cInterface =
         i2c::create(1, 0x70, i2c::I2CInterface::InitialState::CLOSED);
-    Device reg1{"regulator1", true, "/system/chassis/motherboard/reg1",
-                std::move(i2cInterface)};
+    Device reg1{
+        "regulator1", true,
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+        std::move(i2cInterface)};
     idMap.addDevice(reg1);
 
     // Verify object state after constructor
@@ -105,8 +107,10 @@
     // Create Device and add to IDMap
     std::unique_ptr<i2c::I2CInterface> i2cInterface =
         i2c::create(1, 0x70, i2c::I2CInterface::InitialState::CLOSED);
-    Device reg1{"regulator1", true, "/system/chassis/motherboard/reg1",
-                std::move(i2cInterface)};
+    Device reg1{
+        "regulator1", true,
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+        std::move(i2cInterface)};
     idMap.addDevice(reg1);
 
     ActionEnvironment env{idMap, "regulator1"};
diff --git a/phosphor-regulators/test/actions/compare_presence_action_tests.cpp b/phosphor-regulators/test/actions/compare_presence_action_tests.cpp
index e290a0f..aafdecc 100644
--- a/phosphor-regulators/test/actions/compare_presence_action_tests.cpp
+++ b/phosphor-regulators/test/actions/compare_presence_action_tests.cpp
@@ -30,8 +30,10 @@
 
 TEST(ComparePresenceActionTests, Constructor)
 {
-    ComparePresenceAction action{"/system/chassis/motherboard/cpu3", true};
-    EXPECT_EQ(action.getFRU(), "/system/chassis/motherboard/cpu3");
+    ComparePresenceAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu3", true};
+    EXPECT_EQ(action.getFRU(),
+              "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu3");
     EXPECT_EQ(action.getValue(), true);
 }
 
@@ -42,20 +44,26 @@
 
 TEST(ComparePresenceActionTests, GetFRU)
 {
-    ComparePresenceAction action{"/system/chassis/motherboard/cpu2", true};
-    EXPECT_EQ(action.getFRU(), "/system/chassis/motherboard/cpu2");
+    ComparePresenceAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu2", true};
+    EXPECT_EQ(action.getFRU(),
+              "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu2");
 }
 
 TEST(ComparePresenceActionTests, GetValue)
 {
-    ComparePresenceAction action{"/system/chassis/motherboard/cpu3", false};
+    ComparePresenceAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu3",
+        false};
     EXPECT_EQ(action.getValue(), false);
 }
 
 TEST(ComparePresenceActionTests, ToString)
 {
-    ComparePresenceAction action{"/system/chassis/motherboard/cpu2", true};
+    ComparePresenceAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu2", true};
     EXPECT_EQ(action.toString(),
-              "compare_presence: { fru: /system/chassis/motherboard/cpu2, "
+              "compare_presence: { fru: "
+              "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu2, "
               "value: true }");
 }
diff --git a/phosphor-regulators/test/actions/compare_vpd_action_tests.cpp b/phosphor-regulators/test/actions/compare_vpd_action_tests.cpp
index 8ae721b..d44e2e8 100644
--- a/phosphor-regulators/test/actions/compare_vpd_action_tests.cpp
+++ b/phosphor-regulators/test/actions/compare_vpd_action_tests.cpp
@@ -28,8 +28,11 @@
 
 TEST(CompareVPDActionTests, Constructor)
 {
-    CompareVPDAction action{"/system/chassis/disk_backplane", "CCIN", "2D35"};
-    EXPECT_EQ(action.getFRU(), "/system/chassis/disk_backplane");
+    CompareVPDAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/disk_backplane", "CCIN",
+        "2D35"};
+    EXPECT_EQ(action.getFRU(),
+              "/xyz/openbmc_project/inventory/system/chassis/disk_backplane");
     EXPECT_EQ(action.getKeyword(), "CCIN");
     EXPECT_EQ(action.getValue(), "2D35");
 }
@@ -41,26 +44,36 @@
 
 TEST(CompareVPDActionTests, GetFRU)
 {
-    CompareVPDAction action{"/system/chassis/disk_backplane", "CCIN", "2D35"};
-    EXPECT_EQ(action.getFRU(), "/system/chassis/disk_backplane");
+    CompareVPDAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/disk_backplane", "CCIN",
+        "2D35"};
+    EXPECT_EQ(action.getFRU(),
+              "/xyz/openbmc_project/inventory/system/chassis/disk_backplane");
 }
 
 TEST(CompareVPDActionTests, GetKeyword)
 {
-    CompareVPDAction action{"/system/chassis/disk_backplane", "CCIN", "2D35"};
+    CompareVPDAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/disk_backplane", "CCIN",
+        "2D35"};
     EXPECT_EQ(action.getKeyword(), "CCIN");
 }
 
 TEST(CompareVPDActionTests, GetValue)
 {
-    CompareVPDAction action{"/system/chassis/disk_backplane", "CCIN", "2D35"};
+    CompareVPDAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/disk_backplane", "CCIN",
+        "2D35"};
     EXPECT_EQ(action.getValue(), "2D35");
 }
 
 TEST(CompareVPDActionTests, ToString)
 {
-    CompareVPDAction action{"/system/chassis/disk_backplane", "CCIN", "2D35"};
-    EXPECT_EQ(action.toString(),
-              "compare_vpd: { fru: /system/chassis/disk_backplane, keyword: "
-              "CCIN, value: 2D35 }");
+    CompareVPDAction action{
+        "/xyz/openbmc_project/inventory/system/chassis/disk_backplane", "CCIN",
+        "2D35"};
+    EXPECT_EQ(action.toString(), "compare_vpd: { fru: "
+                                 "/xyz/openbmc_project/inventory/system/"
+                                 "chassis/disk_backplane, keyword: "
+                                 "CCIN, value: 2D35 }");
 }
diff --git a/phosphor-regulators/test/actions/i2c_action_tests.cpp b/phosphor-regulators/test/actions/i2c_action_tests.cpp
index 70e55d7..07542f5 100644
--- a/phosphor-regulators/test/actions/i2c_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_action_tests.cpp
@@ -65,8 +65,10 @@
         EXPECT_CALL(*i2cInterface, open).Times(1);
 
         // Create Device, IDMap, ActionEnvironment, and I2CAction
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -90,8 +92,10 @@
         EXPECT_CALL(*i2cInterface, open).Times(0);
 
         // Create Device, IDMap, ActionEnvironment, and I2CAction
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -140,8 +144,10 @@
                 Throw(i2c::I2CException{"Failed to open", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, ActionEnvironment, and I2CAction
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/i2c_compare_bit_action_tests.cpp b/phosphor-regulators/test/actions/i2c_compare_bit_action_tests.cpp
index 08f48bf..d3d0ab0 100644
--- a/phosphor-regulators/test/actions/i2c_compare_bit_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_compare_bit_action_tests.cpp
@@ -96,8 +96,10 @@
             .WillRepeatedly(SetArgReferee<1>(0x96));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -174,8 +176,10 @@
                 i2c::I2CException{"Failed to read byte", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/i2c_compare_byte_action_tests.cpp b/phosphor-regulators/test/actions/i2c_compare_byte_action_tests.cpp
index 436d987..1bd4748 100644
--- a/phosphor-regulators/test/actions/i2c_compare_byte_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_compare_byte_action_tests.cpp
@@ -70,8 +70,10 @@
             .WillOnce(SetArgReferee<1>(0xD7));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -99,8 +101,10 @@
             .WillOnce(SetArgReferee<1>(0xD7));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -125,8 +129,10 @@
             .WillOnce(SetArgReferee<1>(0xD7));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -154,8 +160,10 @@
             .WillOnce(SetArgReferee<1>(0xD7));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -201,8 +209,10 @@
                 i2c::I2CException{"Failed to read byte", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/i2c_compare_bytes_action_tests.cpp b/phosphor-regulators/test/actions/i2c_compare_bytes_action_tests.cpp
index d03b358..5685db7 100644
--- a/phosphor-regulators/test/actions/i2c_compare_bytes_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_compare_bytes_action_tests.cpp
@@ -161,8 +161,10 @@
             .WillOnce(SetArrayArgument<2>(actualValues, actualValues + 2));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -194,8 +196,10 @@
             .WillOnce(SetArrayArgument<2>(actualValues, actualValues + 3));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -223,8 +227,10 @@
             .WillOnce(SetArrayArgument<2>(actualValues, actualValues + 2));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -256,8 +262,10 @@
             .WillOnce(SetArrayArgument<2>(actualValues, actualValues + 3));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -285,8 +293,10 @@
             .WillOnce(SetArrayArgument<2>(actualValues, actualValues + 1));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -339,8 +349,10 @@
                                               "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/i2c_write_bit_action_tests.cpp b/phosphor-regulators/test/actions/i2c_write_bit_action_tests.cpp
index cefc948..d3a7c18 100644
--- a/phosphor-regulators/test/actions/i2c_write_bit_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_write_bit_action_tests.cpp
@@ -101,8 +101,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -133,8 +135,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -184,8 +188,10 @@
         EXPECT_CALL(*i2cInterface, write(A<uint8_t>(), A<uint8_t>())).Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -238,8 +244,10 @@
                 i2c::I2CException{"Failed to write byte", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp b/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
index 1a858e3..4972f5b 100644
--- a/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
@@ -72,8 +72,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -101,8 +103,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -156,8 +160,10 @@
         EXPECT_CALL(*i2cInterface, write(A<uint8_t>(), A<uint8_t>())).Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -207,8 +213,10 @@
                 i2c::I2CException{"Failed to write byte", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/i2c_write_bytes_action_tests.cpp b/phosphor-regulators/test/actions/i2c_write_bytes_action_tests.cpp
index ec698f4..bcc196a 100644
--- a/phosphor-regulators/test/actions/i2c_write_bytes_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_write_bytes_action_tests.cpp
@@ -164,8 +164,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -197,8 +199,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -239,8 +243,10 @@
             .Times(1);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -301,8 +307,10 @@
             .Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -359,8 +367,10 @@
                                               "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/pmbus_read_sensor_action_tests.cpp b/phosphor-regulators/test/actions/pmbus_read_sensor_action_tests.cpp
index d24a04a..cfc4f7e 100644
--- a/phosphor-regulators/test/actions/pmbus_read_sensor_action_tests.cpp
+++ b/phosphor-regulators/test/actions/pmbus_read_sensor_action_tests.cpp
@@ -104,8 +104,10 @@
         EXPECT_CALL(*i2cInterface, read(A<uint8_t>(), A<uint8_t&>())).Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -146,8 +148,10 @@
         EXPECT_CALL(*i2cInterface, read(A<uint8_t>(), A<uint8_t&>())).Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -188,8 +192,10 @@
             .Times(1)
             .WillOnce(SetArgReferee<1>(0b0001'0111));
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -254,8 +260,10 @@
             .WillOnce(SetArgReferee<1>(0b0010'0000));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -312,8 +320,10 @@
                 i2c::I2CException{"Failed to read byte", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -370,8 +380,10 @@
                 i2c::I2CException{"Failed to read word", "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/pmbus_write_vout_command_action_tests.cpp b/phosphor-regulators/test/actions/pmbus_write_vout_command_action_tests.cpp
index f2a5d9a..0afa0d8 100644
--- a/phosphor-regulators/test/actions/pmbus_write_vout_command_action_tests.cpp
+++ b/phosphor-regulators/test/actions/pmbus_write_vout_command_action_tests.cpp
@@ -124,8 +124,10 @@
             .WillOnce(SetArgReferee<1>(0x014D));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -165,8 +167,10 @@
 
         // Create Device, IDMap, and ActionEnvironment.  Set volts value to 3.3
         // in ActionEnvironment.
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -255,8 +259,10 @@
         EXPECT_CALL(*i2cInterface, write(A<uint8_t>(), A<uint16_t>())).Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -312,8 +318,10 @@
         EXPECT_CALL(*i2cInterface, write(A<uint8_t>(), A<uint16_t>())).Times(0);
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -371,8 +379,10 @@
                                               "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -433,8 +443,10 @@
                                               "/dev/i2c-1", 0x70}));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
@@ -494,8 +506,10 @@
             .WillOnce(SetArgReferee<1>(0x014C));
 
         // Create Device, IDMap, and ActionEnvironment
-        Device device{"reg1", true, "/system/chassis/motherboard/reg1",
-                      std::move(i2cInterface)};
+        Device device{
+            "reg1", true,
+            "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+            std::move(i2cInterface)};
         IDMap idMap{};
         idMap.addDevice(device);
         ActionEnvironment env{idMap, "reg1"};
diff --git a/phosphor-regulators/test/actions/set_device_action_tests.cpp b/phosphor-regulators/test/actions/set_device_action_tests.cpp
index c39b9b0..129113e 100644
--- a/phosphor-regulators/test/actions/set_device_action_tests.cpp
+++ b/phosphor-regulators/test/actions/set_device_action_tests.cpp
@@ -42,15 +42,19 @@
     // Create Device regulator1 and add to IDMap
     std::unique_ptr<i2c::I2CInterface> i2cInterface =
         i2c::create(1, 0x70, i2c::I2CInterface::InitialState::CLOSED);
-    Device reg1{"regulator1", true, "/system/chassis/motherboard/reg1",
-                std::move(i2cInterface)};
+    Device reg1{
+        "regulator1", true,
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+        std::move(i2cInterface)};
     idMap.addDevice(reg1);
 
     // Create Device regulator2 and add to IDMap
     i2cInterface =
         i2c::create(1, 0x72, i2c::I2CInterface::InitialState::CLOSED);
-    Device reg2{"regulator2", true, "/system/chassis/motherboard/reg2",
-                std::move(i2cInterface)};
+    Device reg2{
+        "regulator2", true,
+        "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg2",
+        std::move(i2cInterface)};
     idMap.addDevice(reg2);
 
     // Create ActionEnvironment