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

VMware: Fix issues with multiple datacenters with the same name on different folders #52913

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@Tomorrow9
Copy link
Contributor

Tomorrow9 commented Feb 25, 2019

SUMMARY

#45422

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_guest

ADDITIONAL INFORMATION

If there are multiple datacenters with the same in VC, the first matched one will be returned, this may not the real one user wants to use. So modify related part to return datacenter list firstly, and then get through the other parameters to get the real one.


@ansibot

This comment has been minimized.

else:
cluster = None

for dc in datacenter_list:

This comment has been minimized.

@sumkincpp

sumkincpp Mar 5, 2019

Contributor

I have a strong feeling that this for should be inside if/else logic.
For cluster/host we simply looking for first non-empty entries.

This comment has been minimized.

@Tomorrow9

Tomorrow9 Mar 7, 2019

Author Contributor

Can you describe more specifically about the missing scenario? Thanks.

This comment has been minimized.

@sumkincpp

sumkincpp Mar 17, 2019

Contributor

It's more readable to have outside DC loop inside if cluster_name and elif host_name conditions since they are independent within overall context and can be interchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.