bmc-toolbox / bmclib

Library to abstract Baseboard Management Controller interaction
Apache License 2.0
194 stars 37 forks source link

[1/3] Redfishwrapper changes #359

Closed joelrebel closed 1 year ago

joelrebel commented 1 year ago

What does this PR implement/change/remove?

Note: to be merged after https://github.com/bmc-toolbox/bmclib/pull/362

The firmware methods from the redfish provider will be moved into vendor specific providers, which will call into the redfishwrapper where required.

Since each vendor requires its own set of OEM parameters and theres differences in the way the Tasks are handled, the current redfish firmware install methods are getting cumbersome to maintain and extend.

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Attention: 489 lines in your changes are missing coverage. Please review.

Comparison is base (b6c7d29) 44.46% compared to head (e6f756a) 44.99%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #359 +/- ## ========================================== + Coverage 44.46% 44.99% +0.52% ========================================== Files 56 60 +4 Lines 4421 5025 +604 ========================================== + Hits 1966 2261 +295 - Misses 2238 2508 +270 - Partials 217 256 +39 ``` | [Files](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox) | Coverage Δ | | |---|---|---| | [providers/asrockrack/inventory.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL2Fzcm9ja3JhY2svaW52ZW50b3J5Lmdv) | `75.93% <100.00%> (ø)` | | | [providers/redfish/redfish.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3JlZGZpc2gvcmVkZmlzaC5nbw==) | `23.52% <ø> (-2.01%)` | :arrow_down: | | [providers/redfish/tasks.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3JlZGZpc2gvdGFza3MuZ28=) | `38.82% <100.00%> (ø)` | | | [providers/supermicro/errors.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3N1cGVybWljcm8vZXJyb3JzLmdv) | `0.00% <ø> (ø)` | | | [internal/redfishwrapper/task.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-aW50ZXJuYWwvcmVkZmlzaHdyYXBwZXIvdGFzay5nbw==) | `93.33% <93.33%> (ø)` | | | [providers/redfish/firmware.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3JlZGZpc2gvZmlybXdhcmUuZ28=) | `52.10% <62.50%> (-1.47%)` | :arrow_down: | | [providers/supermicro/x11\_firmware\_bmc.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3N1cGVybWljcm8veDExX2Zpcm13YXJlX2JtYy5nbw==) | `68.54% <78.57%> (ø)` | | | [providers/supermicro/floppy.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3N1cGVybWljcm8vZmxvcHB5Lmdv) | `0.00% <0.00%> (ø)` | | | [client.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-Y2xpZW50Lmdv) | `53.07% <0.00%> (-3.49%)` | :arrow_down: | | [internal/redfishwrapper/client.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-aW50ZXJuYWwvcmVkZmlzaHdyYXBwZXIvY2xpZW50Lmdv) | `52.38% <43.75%> (+30.04%)` | :arrow_up: | | ... and [7 more](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/359/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

joelrebel commented 1 year ago

rebase on main