* bmcweb: Memory: Why not use "Present" for Redfish's Status State ?
@ 2020-10-26 18:49 Gunnar Mills
2020-10-27 18:32 ` Andrei Kartashev
0 siblings, 1 reply; 2+ messages in thread
From: Gunnar Mills @ 2020-10-26 18:49 UTC (permalink / raw)
To: pawel.rapkiewicz, Ed Tanous; +Cc: openbmc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bmcweb: Memory: Why not use "Present" for Redfish's Status State ?
2020-10-26 18:49 bmcweb: Memory: Why not use "Present" for Redfish's Status State ? Gunnar Mills
@ 2020-10-27 18:32 ` Andrei Kartashev
0 siblings, 0 replies; 2+ messages in thread
From: Andrei Kartashev @ 2020-10-27 18:32 UTC (permalink / raw)
To: Gunnar Mills, pawel.rapkiewicz, Ed Tanous; +Cc: openbmc
+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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-27 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 18:49 bmcweb: Memory: Why not use "Present" for Redfish's Status State ? Gunnar Mills
2020-10-27 18:32 ` Andrei Kartashev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.