bmcweb: Memory: Why not use "Present" for Redfish's Status State ?
Andrei Kartashev
a.kartashev at yadro.com
Wed Oct 28 05:32:30 AEDT 2020
+1
In some cases we can only detect presence of DIMMs, but not the
details. In such cases this logic a bit painful.
On Mon, 2020-10-26 at 12:49 -0600, Gunnar Mills wrote:
> 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
--
Best regards,
Andrei Kartashev
More information about the openbmc
mailing list