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

feature/update_module_bases #95

Merged

Conversation

mikemorency
Copy link
Collaborator

SUMMARY

This change updates the modules to use the new client pyvmomi/rest classes that were created with the last release. By using these client classes, a lot of code that was in the original module base classes can be removed.

The code that is in the client classes is shared by plugins and modules. Theres still a lot of methods that are used by modules only and include module specific logic. Those methods are staying in the module base classes

I also added some unit tests to cover the basic. I think ill open another PR to add tests to cover most/all methods in these classes.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

pvmomi module base class - _vmware.py
rest module base class - _vmware_rest.py

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

Attention: Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.

Project coverage is 28.04%. Comparing base (77e9060) to head (e3f5240).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
plugins/module_utils/_module_rest_base.py 66.66% 2 Missing ⚠️
plugins/module_utils/_module_pyvmomi_base.py 85.71% 1 Missing ⚠️
plugins/modules/cluster_info.py 75.00% 1 Missing ⚠️
plugins/modules/guest_info.py 75.00% 1 Missing ⚠️
plugins/modules/vm_portgroup_info.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   27.38%   28.04%   +0.66%     
==========================================
  Files          31       31              
  Lines        2542     2350     -192     
  Branches      468      426      -42     
==========================================
- Hits          696      659      -37     
+ Misses       1846     1691     -155     
Flag Coverage Δ
sanity 28.04% <87.75%> (+0.66%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mikemorency mikemorency merged commit b50c216 into ansible-collections:main Jan 6, 2025
13 checks passed
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.

3 participants