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

Move PyVmomiDeviceHelper to module_utils.vm_device_helper #909

Merged

Conversation

mariolenz
Copy link
Collaborator

SUMMARY

I think we should move the class PyVmomiDeviceHelper from vmware_guest to a module util. This way, we can use it in other modules (like vmware_guest_disk) and avoid duplicate code. In the long run, I hope this'll make it easier for us to maintain this collection.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_guest

ADDITIONAL INFORMATION

Context: #905

@mariolenz mariolenz force-pushed the module_utils.vmware_guest branch 2 times, most recently from a42450a to 53dd63e Compare June 22, 2021 20:00
@mariolenz mariolenz force-pushed the module_utils.vmware_guest branch from 53dd63e to 3efd70c Compare June 22, 2021 20:12
@mariolenz
Copy link
Collaborator Author

recheck

@mariolenz mariolenz force-pushed the module_utils.vmware_guest branch from 070f248 to cb4ea2d Compare June 23, 2021 15:27
@mariolenz mariolenz force-pushed the module_utils.vmware_guest branch from cb4ea2d to 6716e08 Compare June 23, 2021 15:42
@mariolenz
Copy link
Collaborator Author

recheck

@mariolenz mariolenz changed the title [WIP] Move PyVmomiDeviceHelper to module_utils.vmware_guest Move PyVmomiDeviceHelper to module_utils.vmware_guest Jun 24, 2021
@mariolenz
Copy link
Collaborator Author

@sky-joker @Tomorrow9 What do you think, should we merge this? Then we could try to refactor vmware_guest_disk to use this.

@mariolenz mariolenz requested review from Tomorrow9 and sky-joker June 24, 2021 10:34
@mariolenz mariolenz changed the title Move PyVmomiDeviceHelper to module_utils.vmware_guest Move PyVmomiDeviceHelper to module_utils.vm_device_helper Jun 24, 2021
@Akasurde Akasurde added the feature_request New feature or request label Jun 25, 2021
@Akasurde Akasurde added this to the v.1.12.0 milestone Jun 25, 2021
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

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

LGTM, will wait for @sky-joker @Tomorrow9

Copy link
Collaborator

@sky-joker sky-joker left a comment

Choose a reason for hiding this comment

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

LGTM

@Akasurde Akasurde added the gate label Jun 26, 2021
@ansible-zuul ansible-zuul bot merged commit 6643fc3 into ansible-collections:main Jun 26, 2021
@mariolenz mariolenz deleted the module_utils.vmware_guest branch June 27, 2021 16:19
ansible-zuul bot pushed a commit that referenced this pull request Jun 29, 2021
vmware_guest_disk: Use functions from module_utils

SUMMARY
Remove duplicate code from vmware_guest_disk by using the functions from module_utils.vm_device_helper. PyVmomiDeviceHelper.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
vmware_guest_disk
ADDITIONAL INFORMATION
Follow-up to PR #909

Reviewed-by: Diane Wang <None>
Reviewed-by: sky-joker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature_request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants