Name of global custom attributes are not managed by the inventory (#41786)

pull/41019/merge
smutel 6 years ago committed by Abhijeet Kasurde
parent ed5a0f2d9c
commit f7dbf581b1

@ -397,7 +397,7 @@ class VMWareInventory(object):
cfm = content.customFieldsManager
if cfm is not None and cfm.field:
for f in cfm.field:
if f.managedObjectType == vim.VirtualMachine:
if not f.managedObjectType or f.managedObjectType == vim.VirtualMachine:
self.custom_fields[f.key] = f.name
self.debugl('%d custom fields collected' % len(self.custom_fields))
except vmodl.RuntimeFault as exc:

Loading…
Cancel
Save