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/prep module utils #85

Conversation

mikemorency
Copy link
Collaborator

SUMMARY

This is preparing the pymomi module utils to be made public. Most of the method names were updated in pyvmomi to reflect what they actually do. Additionally some of the documentation fragments and arg specs can be consolidated, as there is no significant difference between the fragments we do have.

There should be no change in functionality.

I am not able to update the rest utils yet. I think i see some possible bugs with the current methods and I want to confirm and fix those first

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

module_utils/_vmware

@mikemorency mikemorency requested a review from mariolenz December 3, 2024 18:16
Copy link
Collaborator Author

@mikemorency mikemorency left a comment

Choose a reason for hiding this comment

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

i think we could also remove the vmware prefix from the module_utils file names. I dont really see a need for it. Any opinions?

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 44.15584% with 43 lines in your changes missing coverage. Please review.

Project coverage is 27.71%. Comparing base (94ea806) to head (21e5089).

Files with missing lines Patch % Lines
plugins/module_utils/_vmware_pyvmomi.py 28.12% 23 Missing ⚠️
plugins/modules/cluster_info.py 33.33% 4 Missing ⚠️
plugins/modules/cluster_vcls.py 33.33% 4 Missing ⚠️
plugins/modules/cluster.py 50.00% 2 Missing ⚠️
plugins/modules/cluster_dpm.py 50.00% 2 Missing ⚠️
plugins/modules/cluster_drs.py 50.00% 2 Missing ⚠️
plugins/modules/cluster_drs_recommendations.py 50.00% 2 Missing ⚠️
plugins/modules/folder_template_from_vm.py 50.00% 2 Missing ⚠️
plugins/modules/vm_portgroup_info.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   27.48%   27.71%   +0.22%     
==========================================
  Files          24       25       +1     
  Lines        2059     2071      +12     
  Branches      385      387       +2     
==========================================
+ Hits          566      574       +8     
- Misses       1493     1497       +4     
Flag Coverage Δ
sanity 27.71% <44.15%> (+0.22%) ⬆️

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.

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.

This is preparing the pymomi module utils to be made public.

Thanks, I really appreciate this!

But it looks like there are quite a lot of changes. I feel a little bit overwhelmed. Would it be possible to break this down to several PRs? For example, it looks like you've just added some indentation to plugins/doc_fragments/vmware.py. Would it be possible to have a PR just for this?

There are some other changes that I'm not too sure about. But it's hard to discuss them. This PR is quite a mouthful (at least to me).

i think we could also remove the vmware prefix from the module_utils file names. I dont really see a need for it. Any opinions?

I fully agree. vmware.vmware.plugins.module_utils._vmware is a little bit redundant. I see the same thing in comunity.vmware where most modules start with vmware_, too. But that's my problem, not yours ;-)

Anyway, I think this also would be easier to fix / discuss if we have a separate PR just on this.

@mikemorency mikemorency closed this Dec 4, 2024
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