mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Name of global custom attributes are not managed by the inventory (#41786)
This commit is contained in:
@@ -397,7 +397,7 @@ class VMWareInventory(object):
|
|||||||
cfm = content.customFieldsManager
|
cfm = content.customFieldsManager
|
||||||
if cfm is not None and cfm.field:
|
if cfm is not None and cfm.field:
|
||||||
for f in 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.custom_fields[f.key] = f.name
|
||||||
self.debugl('%d custom fields collected' % len(self.custom_fields))
|
self.debugl('%d custom fields collected' % len(self.custom_fields))
|
||||||
except vmodl.RuntimeFault as exc:
|
except vmodl.RuntimeFault as exc:
|
||||||
|
|||||||
Reference in New Issue
Block a user