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

Update vmware_guest.py docs #2272

Merged

Conversation

danielkucera
Copy link
Contributor

SUMMARY

None of name or vlan is in fact required. For correct operation either one can be specified.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

vmware_guest

ADDITIONAL INFORMATION

This cost us about 2 hours of debugging because we thought that vlan is required. When we specified both name and vlan, another network was picked than we specified in name because vlan takes precedence and there was another network available with the same vlan id.
This PR might be worth backporting to all version where this applies.

Relevant code section:

self.module.fail_json(msg="Please specify at least a network name or"
" a VLAN name under VM network list.")


@danielkucera
Copy link
Contributor Author

recheck

@danielkucera
Copy link
Contributor Author

recheck

@danielkucera
Copy link
Contributor Author

recheck

@mariolenz
Copy link
Collaborator

I'm sorry, I didn't find much time to work on this collection during the last weeks. I hope I'm able to review this PR soon.

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.

Thanks for this @danielkucera! But I think you're wrong in saying that those options are both simply optional. It looks like you need at least one of them:

if 'name' not in network and 'vlan' not in network:
self.module.fail_json(msg="Please specify at least a network name or"
" a VLAN name under VM network list.")

I suggest to make this clear. Feel free to improve my wording if you don't like it :-)

plugins/modules/vmware_guest.py Outdated Show resolved Hide resolved
plugins/modules/vmware_guest.py Outdated Show resolved Hide resolved
@mariolenz mariolenz added documentation Improvements or additions to documentation mergeit labels Jan 18, 2025
Copy link

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/30d1506528b94272bdced05006523c84

✔️ ansible-tox-linters SUCCESS in 5m 22s
✔️ build-ansible-collection SUCCESS in 5m 58s
✔️ ansible-galaxy-importer SUCCESS in 5m 33s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 6491d02 into ansible-collections:main Jan 18, 2025
13 checks passed
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 18, 2025
SUMMARY
Only one of name or vlan is in fact required.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
vmware_guest
ADDITIONAL INFORMATION
Backport of #2272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation mergeit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants