Memory: Fix the missing fields in Dimm Response
The Dimm response has some missing fields i.e. Manufacturer and
FirmwareRevision, due to some properties not being unpacked. This
commit fixes that issue.
Tested:
Redfish validator passed
Dimm Response before fix shows missing Manufacturer and
FirmwareRevision fields
```
wget -qO- http://localhost:80/redfish/v1/Systems/system/Memory/dimm0
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm0",
"@odata.type": "#Memory.v1_11_0.Memory",
"AllowedSpeedsMHz": [],
"BaseModuleType": "...",
"BusWidthBits": ...,
"CapacityMiB": .....,
"DataWidthBits": ..,
"ErrorCorrection": ".....",
<<<======= Missing FirmwareRevision field
"Id": "dimm0",
"Links": {
"Chassis": {
"@odata.id": "...."
}
},
"Location": {
"PartLocation": {
"LocationType": "Slot",
"ServiceLabel": "DIMM6"
}
},
<<<<==== Missing Manufacturer field
"MemoryDeviceType": "...",
"MemoryType": "....",
"Model": "",
"Name": "DIMM Slot",
"OperatingSpeedMhz": ....,
"PartNumber": "......",
"RankCount": ....,
"SerialNumber": "....",
"SparePartNumber": "..",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}
```
Dimm Response after fix shows Manufacturer and
FirmwareRevision fields present
```
wget -qO- http://localhost:80/redfish/v1/Systems/system/Memory/dimm0
{
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm0",
"@odata.type": "#Memory.v1_11_0.Memory",
"AllowedSpeedsMHz": [],
"BaseModuleType": "....",
"BusWidthBits": ...,
"CapacityMiB": ....,
"DataWidthBits": ...,
"ErrorCorrection": "...",
"FirmwareRevision": "...",
"Id": "dimm0",
"Links": {
"Chassis": {
"@odata.id": "...."
}
},
"Location": {
"PartLocation": {
"LocationType": "Slot",
"ServiceLabel": "DIMM6"
}
},
"Manufacturer": "....",
"MemoryDeviceType": "...",
"MemoryType": "...",
"Model": "",
"Name": "DIMM Slot",
"OperatingSpeedMhz": ...,
"PartNumber": "...",
"RankCount": ...,
"SerialNumber": ".....",
"SparePartNumber": "...",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}
```
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
Change-Id: I4de83a5038fe77e19a1b8b16e479348677fb30c1
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index feeb102..988a251 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -422,9 +422,10 @@
const bool success = sdbusplus::unpackPropertiesNoThrow(
dbus_utils::UnpackErrorPrinter(), properties, "MemoryDataWidth",
memoryDataWidth, "MemorySizeInKB", memorySizeInKB, "PartNumber",
- partNumber, "SerialNumber", serialNumber, "Present", present,
- "MemoryTotalWidth", memoryTotalWidth, "ECC", ecc, "FormFactor",
- formFactor, "AllowedSpeedsMT", allowedSpeedsMT, "MemoryAttributes",
+ partNumber, "SerialNumber", serialNumber, "Manufacturer", manufacturer,
+ "RevisionCode", revisionCode, "Present", present, "MemoryTotalWidth",
+ memoryTotalWidth, "ECC", ecc, "FormFactor", formFactor,
+ "AllowedSpeedsMT", allowedSpeedsMT, "MemoryAttributes",
memoryAttributes, "MemoryConfiguredSpeedInMhz",
memoryConfiguredSpeedInMhz, "MemoryType", memoryType, "Channel",
channel, "MemoryController", memoryController, "Slot", slot, "Socket",