mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
vmware_inventory: permit to skip nopermission error on host subkeys (notify user in debug mode) (#21663)
example use case: you have rights on guest but you cannot see the VMWare host Signed-off-by: nerzhul <loic.blot@unix-experience.fr>
This commit is contained in:
parent
6622b05326
commit
d144cf9c27
1 changed files with 9 additions and 6 deletions
|
@ -685,12 +685,15 @@ class VMWareInventory(object):
|
|||
if self.lowerkeys:
|
||||
method = method.lower()
|
||||
if level + 1 <= self.maxlevel:
|
||||
rdata[method] = self._process_object_types(
|
||||
methodToCall,
|
||||
thisvm=thisvm,
|
||||
inkey=inkey + '.' + method,
|
||||
level=(level + 1)
|
||||
)
|
||||
try:
|
||||
rdata[method] = self._process_object_types(
|
||||
methodToCall,
|
||||
thisvm=thisvm,
|
||||
inkey=inkey + '.' + method,
|
||||
level=(level + 1)
|
||||
)
|
||||
except vim.fault.NoPermission:
|
||||
self.debugl("Skipping method %s (NoPermission)" % method)
|
||||
else:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue