Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol"
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 Protocol
s "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.eMMC"
Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2bd19190c445ce57f3d867ffbb437c1a4a370b51
diff --git a/src/estoraged.cpp b/src/estoraged.cpp
index d2ff1ef..88529b7 100644
--- a/src/estoraged.cpp
+++ b/src/estoraged.cpp
@@ -39,6 +39,7 @@
const std::string& serialNumber,
const std::string& locationCode, uint64_t eraseMaxGeometry,
uint64_t eraseMinGeometry, const std::string& driveType,
+ const std::string& driveProtocol,
std::unique_ptr<CryptsetupInterface> cryptInterface,
std::unique_ptr<FilesystemInterface> fsInterface) :
devPath(devPath),
@@ -90,6 +91,9 @@
driveInterface->register_property(
"Type",
"xyz.openbmc_project.Inventory.Item.Drive.DriveType." + driveType);
+ driveInterface->register_property(
+ "Protocol", "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol." +
+ driveProtocol);
/* This registers the Locked property for the Drives interface.
* Now it is the same as the volume Locked property */
driveInterface->register_property_r(