Add association between chassis and drive
This commit adds an association between the storage device ("drive") and
the associated chassis. Specifically, the new association is the
following:
["chassis", "drive", <chassis_path>]
This association will be used in bmcweb to add Redfish links between
drive and chassis.
Tested:
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Association.Definitions Associations
$ busctl get-property xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/inventory/system/board/dcscm/drive \
xyz.openbmc_project.Association endpoints
$ busctl get-property xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/inventory/storage/mmcblk0/chassis \
xyz.openbmc_project.Association endpoints
Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: Ie21725e9ceb5134ac94854dcb06f3b86a48eeabd
diff --git a/src/test/estoraged_test.cpp b/src/test/estoraged_test.cpp
index b98144e..89581ab 100644
--- a/src/test/estoraged_test.cpp
+++ b/src/test/estoraged_test.cpp
@@ -38,13 +38,11 @@
public:
const char* testFileName = "testfile";
const char* testLuksDevName = "testfile_luksDev";
+ const std::string testConfigPath =
+ "/xyz/openbmc_project/inventory/system/board/test_board/test_emmc";
const uint64_t testSize = 24;
const uint8_t testLifeTime = 25;
std::ofstream testFile;
- const char* testPath = "/test/openbmc_project/storage/test_dev";
- const char* estoragedInterface =
- "xyz.openbmc_project.Inventory.Item.Volume";
- const char* driveInterface = "xyz.openbmc_project.Inventory.Item.Drive";
std::string passwordString;
std::vector<uint8_t> password;
MockCryptsetupInterface* mockCryptIface{};
@@ -83,8 +81,8 @@
objectServer = std::make_unique<sdbusplus::asio::object_server>(conn);
esObject = std::make_unique<estoraged::EStoraged>(
- *objectServer, testFileName, testLuksDevName, testSize,
- testLifeTime, std::move(cryptIface), std::move(fsIface));
+ *objectServer, testConfigPath, testFileName, testLuksDevName,
+ testSize, testLifeTime, std::move(cryptIface), std::move(fsIface));
}
void TearDown() override