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:
Abhijeet Kasurde 2017-12-15 16:26:19 +05:30 committed by GitHub
parent 31510259f6
commit 29d3505cb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 183 additions and 24 deletions

View file

@ -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