-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redfish: centralize payload inspection logic and OEM logic #5425
Redfish: centralize payload inspection logic and OEM logic #5425
Conversation
…uests to a Redfish service
This comment was marked as outdated.
This comment was marked as outdated.
Update: Everything has checked out with my unit testing with the current changes. Remaining item is to add common vendor checking for various workaround logic. |
@felixfontein would it be possible to remove the |
@mraineri we should probably deprecate them before removing, something like this:
|
@mraineri btw, do you think you can complete this by the end of this week, so we can make sure it will make it into the 6.0.0 release on next Monday? |
Thanks; I'll do that!
Yup, I should have everything in before then; just testing the OEM check changes now. |
Would it be possible to do something similar to turn public methods into private methods? I'd like to take some of the |
Sure, you could rename the method (leading underscore) and add another method with the old name that calls |
Thanks! I'll save that for a future change so I can get the critical portion in. |
OEM workaround logic has been tested. It's worth noting that the pattern I'd like to establish is for the module to always try the "correct" approach first, and then fall back to workaround logic when errors are encountered. That way if a vendor patches their BMC to support the correct method of implementing the API, no changes are needed in the module to make use of the better approach. |
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only glanced over the code, but it looks good to me.
@mraineri thanks a lot for improving this! |
…ollections#5425) * Redfish: centralize payload checking when performing modification requests to a Redfish service * CI fixes * Updates based on unit testing * CI fix * Modified vendor-specific logic to establish common pattern for workarounds
…ollections#5425) * Redfish: centralize payload checking when performing modification requests to a Redfish service * CI fixes * Updates based on unit testing * CI fix * Modified vendor-specific logic to establish common pattern for workarounds
…ollections#5425) * Redfish: centralize payload checking when performing modification requests to a Redfish service * CI fixes * Updates based on unit testing * CI fix * Modified vendor-specific logic to establish common pattern for workarounds
…ollections#5425) * Redfish: centralize payload checking when performing modification requests to a Redfish service * CI fixes * Updates based on unit testing * CI fix * Modified vendor-specific logic to establish common pattern for workarounds
…ollections#5425) * Redfish: centralize payload checking when performing modification requests to a Redfish service * CI fixes * Updates based on unit testing * CI fix * Modified vendor-specific logic to establish common pattern for workarounds
SUMMARY
There is a great deal of copy/paste code that does this in many places prior to invoking a PATCH request to the service. Added common logic for performing inspection of payloads when performing modification requests, which allowed for this copy/paste code to be removed throughout the module. It also alleviated cases where multiple GET requests to the same URI are being made, so this improves the I/O efficiency.
I'm still running tests to make sure I didn't break anything. The intent is to make this 100% backwards compatible, so no users should see a functional change from a module API perspective.
I also still have an outstanding item to centralize OEM checking for performing workarounds. I wanted eyes on these changes while I had them ready to ensure folks like what I'm doing.
Fixes #5210
ISSUE TYPE
COMPONENT NAME
redfish_utils
ADDITIONAL INFORMATION