Skip to content
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 refactor #296

Merged
merged 4 commits into from
Dec 2, 2022
Merged

Redfish refactor #296

merged 4 commits into from
Dec 2, 2022

Conversation

joelrebel
Copy link
Member

What does this PR implement/change/remove?

This is based on the feedback in #291

This moves the redfish client wrapping outside of the providers/redfish
package, these methods always check the redfish session is valid before
calling into the wrapped redfish library - gofish.

By moving this out, other providers can also import the redfishwrapper.

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Base: 43.69% // Head: 46.53% // Increases project coverage by +2.83% 🎉

Coverage data is based on head (8448345) compared to base (b23aff4).
Patch coverage: 34.78% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
+ Coverage   43.69%   46.53%   +2.83%     
==========================================
  Files          27       27              
  Lines        2435     2265     -170     
==========================================
- Hits         1064     1054      -10     
+ Misses       1248     1096     -152     
+ Partials      123      115       -8     
Impacted Files Coverage Δ
client.go 0.00% <0.00%> (ø)
providers/redfish/inventory.go 3.14% <0.00%> (-2.05%) ⬇️
providers/redfish/inventory_collect.go 0.00% <0.00%> (ø)
providers/redfish/user.go 0.00% <0.00%> (ø)
providers/asrockrack/helpers.go 49.04% <33.33%> (+1.45%) ⬆️
providers/redfish/redfish.go 18.86% <40.90%> (+10.29%) ⬆️
providers/redfish/firmware.go 44.05% <80.00%> (+1.19%) ⬆️
providers/redfish/tasks.go 69.44% <100.00%> (-0.42%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

chrisdoherty4
chrisdoherty4 previously approved these changes Nov 28, 2022
@chrisdoherty4
Copy link
Collaborator

@joelrebel Will wait for the rebase, ping when ready.

This moves the redfish client wrapping outside of the providers/redfish
package, these methods always check the redfish session is valid before
calling into the wrapped redfish library - gofish.

By moving this out, other providers can also import the redfishwrapper.
The redfishwrapper validates the redfish session is active before
any calling into the redfish methods. The rest of changes tries to
prevents direct interaction with the gofish library methods although the
gofish objects are accessed as is.
@joelrebel
Copy link
Member Author

@chrisdoherty4 good to go now.

@joelrebel joelrebel merged commit 31e3dc1 into main Dec 2, 2022
@joelrebel joelrebel deleted the redfish-refactor branch December 2, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants