diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2020-10-26 23:09:19 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2020-11-26 07:34:07 +0300 |
commit | c511b7febf37f211c97af0bf838dc7eb030586d0 (patch) | |
tree | 0016d0d9a73fec2b6aad82410d800d3d53f77f22 /redfish-core/lib/memory.hpp | |
parent | ceb8ddc11b79e771cac1b8fbacd4e72e833de0e8 (diff) | |
download | bmcweb-c511b7febf37f211c97af0bf838dc7eb030586d0.tar.xz |
Memory: Remove if (*memorySize == 0)
Sent to mailing list here:
https://lists.ozlabs.org/pipermail/openbmc/2020-October/023744.html
Remove the if MemorySizeInKB is 0 set the "Status""State" to Absent
and return.
More work needed here to make Present and Functional
work correctly.
Tested: Validator passes.
curl -k https://$bmc/redfish/v1/Systems/system/Memory/dimm6
{
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm6",
"@odata.type": "#Memory.v1_7_0.Memory",
"AllowedSpeedsMHz": [],
"BaseModuleType": "RDIMM",
"BusWidthBits": 0,
"CapacityMiB": 0,
"DataWidthBits": 0,
"ErrorCorrection": "NoECC",
"FirmwareRevision": "0",
"Id": "dimm6",
"Manufacturer": "Micron Technology",
"Name": "DIMM Slot",
"OperatingSpeedMhz": 0,
"PartNumber": "",
"RankCount": 0,
"SerialNumber": "0x156d5d4f",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
Change-Id: I40ab44b1cb5db266d0766501a6f625168baaa2a6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/memory.hpp')
-rw-r--r-- | redfish-core/lib/memory.hpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp index aaff47399e..c85b0001bc 100644 --- a/redfish-core/lib/memory.hpp +++ b/redfish-core/lib/memory.hpp @@ -468,15 +468,6 @@ inline void getDimmDataByService(std::shared_ptr<AsyncResp> aResp, { // Important property not in desired type messages::internalError(aResp->res); - - return; - } - if (*memorySize == 0) - { - // Slot is not populated, set status end return - aResp->res.jsonValue["Status"]["State"] = "Absent"; - aResp->res.jsonValue["Status"]["Health"] = "OK"; - // HTTP Code will be set up automatically, just return return; } aResp->res.jsonValue["CapacityMiB"] = (*memorySize >> 10); |