Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType"
property in the Drive schema.
Tested:
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive Type
s "xyz.openbmc_project.Inventory.Item.Drive.DriveType.SSD"
$ curl http://localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0
{
...
"MediaType": "SSD",
...
}
Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2cb6c7d3ec3b49e8d666da940d873f1117a0aa85
diff --git a/src/test/util_test.cpp b/src/test/util_test.cpp
index 708454d..86e86e9 100644
--- a/src/test/util_test.cpp
+++ b/src/test/util_test.cpp
@@ -143,6 +143,7 @@
EXPECT_EQ("U102020", result->locationCode);
EXPECT_EQ(ERASE_MAX_GEOMETRY, result->eraseMaxGeometry);
EXPECT_EQ(ERASE_MIN_GEOMETRY, result->eraseMinGeometry);
+ EXPECT_EQ("SSD", result->driveType);
/* Delete the dummy files. */
EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
@@ -199,6 +200,7 @@
EXPECT_EQ("U102020", result->locationCode);
EXPECT_EQ(5566, result->eraseMaxGeometry);
EXPECT_EQ(1234, result->eraseMinGeometry);
+ EXPECT_EQ("SSD", result->driveType);
/* Delete the dummy files. */
EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));