Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion redfish-core/lib/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,12 @@ inline void getDriveAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string* serialNumber = nullptr;
const std::string* manufacturer = nullptr;
const std::string* model = nullptr;
const std::string* revision = nullptr;

const bool success = sdbusplus::unpackPropertiesNoThrow(
dbus_utils::UnpackErrorPrinter(), propertiesList, "PartNumber",
partNumber, "SerialNumber", serialNumber, "Manufacturer",
manufacturer, "Model", model);
manufacturer, "Model", model, "Revision", revision);

if (!success)
{
Expand All @@ -342,6 +343,11 @@ inline void getDriveAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["Model"] = *model;
}

if (revision != nullptr)
{
asyncResp->res.jsonValue["Revision"] = *revision;
}
});
}

Expand Down