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>pull/4420/head
parent
6622b05326
commit
d144cf9c27
|
@ -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 New Issue