mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
VMware: check for ESXi server while creating user (#33061)
This fix check for ESXi server instance before proceeding with managing local user. Also, adds integration tests for this change. Fixes: #32465 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -1233,6 +1233,11 @@ class PyVmomiHelper(PyVmomi):
|
||||
if current_parent.name == parent.name:
|
||||
return True
|
||||
|
||||
# Check if we have reached till root folder
|
||||
moid = current_parent._moId
|
||||
if moid in ['group-d1', 'ha-folder-root']:
|
||||
return False
|
||||
|
||||
current_parent = current_parent.parent
|
||||
if current_parent is None:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user