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

make pyvmomi client inputs explicit #134

Conversation

mikemorency
Copy link
Collaborator

SUMMARY

Testing the recommendation from #133 and making client parameters explicit instead of relying on a dict

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

client/_pyvmomi

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 88.40580% with 8 lines in your changes missing coverage. Please review.

Project coverage is 60.78%. Comparing base (512f488) to head (23dcfb3).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
plugins/module_utils/clients/_rest.py 79.31% 1 Missing and 5 partials ⚠️
plugins/module_utils/clients/_pyvmomi.py 92.30% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
- Coverage   60.84%   60.78%   -0.07%     
==========================================
  Files          58       58              
  Lines        3731     3738       +7     
  Branches      597      597              
==========================================
+ Hits         2270     2272       +2     
- Misses       1306     1312       +6     
+ Partials      155      154       -1     
Flag Coverage Δ
units 60.78% <88.40%> (-0.07%) ⬇️

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mikemorency mikemorency requested a review from mariolenz March 6, 2025 15:04
@mikemorency mikemorency marked this pull request as ready for review March 6, 2025 15:04
Copy link
Collaborator

@mariolenz mariolenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @mikemorency!

@mikemorency mikemorency merged commit d0e2a93 into ansible-collections:main Mar 10, 2025
19 checks passed
softwarefactory-project-zuul bot pushed a commit to ansible-collections/community.vmware that referenced this pull request Mar 15, 2025
SUMMARY
I think it might be helpful to de-couple the basic module logic from connecting to vSphere.
This might be a first step to re-use code from vmware.vmware. That is, if they make plugins/module_utils/clients/_pyvmomi.py public.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/module_utils/clients/_vmware.py
plugins/module_utils/vmware.py
tests/unit/module_utils/test_vmware.py
ADDITIONAL INFORMATION
ansible-collections/vmware.vmware#133
ansible-collections/vmware.vmware#134
edit:
vmdk_disk_path_split isn't used anywhere in this collection and therefor deprecated (#2311), so I think we can safely remove the unit tests for this: d741875
edit2:
Since the collection requires ansible-core 2.17.0, which doesn't  support Python 2.x at all, I guess we can drop (unit) tests for Python >= 2.7: 1ebf551

Reviewed-by: mikemorency
Reviewed-by: Alexander Nikitin <[email protected]>
Reviewed-by: Mario Lenz <[email protected]>
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