bmcweb: Memory: Why not use "Present" for Redfish's Status State ?

Gunnar Mills gmills at linux.vnet.ibm.com
Tue Oct 27 05:49:45 AEDT 2020


Hi Ed and Pawel,

I am missing some context here.
Why if MemorySizeInKB is 0 we set the "Status""State" of the DIMM to Absent?
Why not use the Present property?

https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/memory.hpp#L373

https://github.com/openbmc/phosphor-dbus-interfaces/blob/8aec946e2844831cfc377c0e0136de5714c08a5b/xyz/openbmc_project/Inventory/Item.interface.yaml#L9

By default MemorySizeInKB is 0 so if MemorySizeInKB hasn't been set your 
DIMM looks like (all other properties are skipped):

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",
   "Id": "dimm6",
   "Name": "DIMM Slot",
   "Status": {
     "Health": "OK",
     "HealthRollup": "OK",
     "State": "Absent"
   }

This logic was added here:
https://github.com/openbmc/bmcweb/commit/443c2934ac1ae86b6d496e3509e2b8acf283fb18

Thanks,
Gunnar


More information about the openbmc mailing list