Handle GET and PATCH for ReadyToRemove on assemblies#1500
Conversation
eaa353d to
2a8d183
Compare
|
Can one of the admins verify this patch? |
|
add to approvelist |
2a8d183 to
926a18a
Compare
|
| } | ||
| return; | ||
| } | ||
| asyncResp->res |
There was a problem hiding this comment.
As mentioned, remove "Oem" as it is in standard Redfish schema
There was a problem hiding this comment.
Changed to display ReadyToRemove directly under Assembly properties
| assemblyJsonPtr); | ||
| } | ||
| else if (interface == | ||
| "xyz.openbmc_project.State.Decorator.ReadyToRemove") |
There was a problem hiding this comment.
string literal duplication.
else if (interface == readyToRemoveIface)?
| #include <utility> | ||
| #include <vector> | ||
|
|
||
| static constexpr std::string_view readyToRemoveIface = |
There was a problem hiding this comment.
static constexpr const char* readyToRemoveIface =
"xyz.openbmc_project.State.Decorator.ReadyToRemove";
If you change it to the above, then you can directly use in line 167 (you can skip std::string(..)) and line 234
926a18a to
175c893
Compare
175c893 to
9ea3794
Compare
| } | ||
|
|
||
| std::map<std::string, bool> locationIndicatorActiveMap; | ||
| std::map<std::string, nlohmann::json> oemIndicatorMap; |
There was a problem hiding this comment.
As discussed offline, you can keep OemIndicatorMap as is and, just add the readyToRemoveMap to use it for our usecase (line 394)
We can move from the existing Oem property to use the standard redfish for batteryCM in another PR.
@gtmills ^
There was a problem hiding this comment.
retained handling of oem/openbmc/readytoremove for tod battery and panels, added separate handling for readytoremove
| { | ||
| if (memberId) | ||
| { | ||
| oemIndicatorMap[*memberId] = *oem; |
There was a problem hiding this comment.
Please have the existing code as it is, in this PR
9ea3794 to
ed3c2b8
Compare
Add GET handling for Assembly ReadyToRemove by reading the xyz.openbmc_project.State.Decorator.ReadyToRemove interface from the inventory. Update PATCH handling so non-special assemblies set the D-Bus ReadyToRemove. Keep existing special handling for tod_battery and panel CM. ReadyToRemove is now part of the assemblyproperty and not under oem schema Tested-By: 1. GET returns the correct property under the inventory d-bus 2. PATCH sets the readytoremove on the inventory dbus Signed-off-by: Rahul D S <rahulds.rahul@gmail.com>
ed3c2b8 to
e860b1b
Compare
Add GET handling for Assembly ReadyToRemove by reading the xyz.openbmc_project.State.ReadyToRemove interface from the inventory object and exposing it under the assembly
Update PATCH handling so non-special assemblies set the D-Bus ReadyToRemove property directly instead of rejecting the request. Keep existing special handling for tod_battery and panel FRUs.
Tested-By:
GET:
returns the ReadyToRemove on lcd-op-panel
PATCH:
sets the readytoremove property value on the bmc inventory object