-
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
Fix errors in hpe specific get methods #7952
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Yuck, I didn't realize we had some HPE additions in there... We might need to think about removing those long-term since this really is meant to just cover vanilla Redfish. At the very least, the changes you're introducing are all good; besides the trailing whitespaces, everything looks good to me. Thanks for finding this! |
* corrects reference to non existent `self.chassis_uri_list` to `self.chassis_uris` * corrects syntactically incorrect dereferences * removes an uneccessary variable assignment to `chassis_uri_list` in `get_psu_inventory` method * adds changelog fragment for above indicating fix of issue ansible-collections#7951
I've corrected lines flagged by the linter and squashed my commits. |
Also, I'm not sure what the release pattern is for bug fixes to this repo, but it'd be really swell if this was backported to 7.7.x so that EPEL might pick it up for rhel, alma and rocky 9.3 users |
I'm assuming since @felixfontein tagged it with "backport-7" it should make it back into that release. Hopefully they'll confirm that. |
Yes, it will, assuming there is no conflict during backporting. If that happens, you'd (you = whoever wants to have it in stable-7 ;) ) have to manually backport it to stable-7 in case you want it to appear in a new 7.x.y release. |
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #8021 🤖 @patchback |
* Fix errors in hpe specific get methods * corrects reference to non existent `self.chassis_uri_list` to `self.chassis_uris` * corrects syntactically incorrect dereferences * removes an uneccessary variable assignment to `chassis_uri_list` in `get_psu_inventory` method * adds changelog fragment for above indicating fix of issue #7951 * Update changelog. --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit dd7c3ad)
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #8022 🤖 @patchback |
* Fix errors in hpe specific get methods * corrects reference to non existent `self.chassis_uri_list` to `self.chassis_uris` * corrects syntactically incorrect dereferences * removes an uneccessary variable assignment to `chassis_uri_list` in `get_psu_inventory` method * adds changelog fragment for above indicating fix of issue #7951 * Update changelog. --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit dd7c3ad)
… methods (#8021) Fix errors in hpe specific get methods (#7952) * Fix errors in hpe specific get methods * corrects reference to non existent `self.chassis_uri_list` to `self.chassis_uris` * corrects syntactically incorrect dereferences * removes an uneccessary variable assignment to `chassis_uri_list` in `get_psu_inventory` method * adds changelog fragment for above indicating fix of issue #7951 * Update changelog. --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit dd7c3ad) Co-authored-by: Dave Rawks <[email protected]>
… methods (#8022) Fix errors in hpe specific get methods (#7952) * Fix errors in hpe specific get methods * corrects reference to non existent `self.chassis_uri_list` to `self.chassis_uris` * corrects syntactically incorrect dereferences * removes an uneccessary variable assignment to `chassis_uri_list` in `get_psu_inventory` method * adds changelog fragment for above indicating fix of issue #7951 * Update changelog. --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit dd7c3ad) Co-authored-by: Dave Rawks <[email protected]>
* Fix errors in hpe specific get methods * corrects reference to non existent `self.chassis_uri_list` to `self.chassis_uris` * corrects syntactically incorrect dereferences * removes an uneccessary variable assignment to `chassis_uri_list` in `get_psu_inventory` method * adds changelog fragment for above indicating fix of issue ansible-collections#7951 * Update changelog. --------- Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
While using the
redfish_info
module against some HPE hardware I encountered a variety of uncaught exceptions. After tracing it back I found these two methods to be the culprit. As they have a variety of syntax and logical errors.ISSUE TYPE
COMPONENT NAME
redfish
ADDITIONAL INFORMATION
It is worth noting that these methods and their inclusion in the
all
commands
to theChassis
category
of theredfish_info
module does result in attempting to get information from OEM/Vendor specific extensions in a module which seems to otherwise attempt to only cover the generic redfish interface.Additionally, due to the way these methods have been implemented, they both return a single value even when multiple chassis uris have a matching api command to return min fan speed and thermal configuration. I've left that logic as is so that consumers of this module do not experience breakage from a change in the "shape" of the returned data.
Ultimately I /think/ that these methods and the codepath that calls them should be removed in a future release and we should consider adding a deprecation warning.
Resolves #7951
before the change
after: