From a3321d1074417ab68cbf33e94db765dc251d845c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 18 Jan 2017 14:36:11 +0100 Subject: [PATCH] vmware_inventory.py: skip_keys can use a full key path (#20389) use inkey attribute in _process_object_types recursive loop to generate key name in skip_keys directive. This permit to ignore nested variables, for example summary.vm to optimize inventory collect --- contrib/inventory/vmware_inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/inventory/vmware_inventory.py b/contrib/inventory/vmware_inventory.py index 96cdaef9f9..84979dc270 100755 --- a/contrib/inventory/vmware_inventory.py +++ b/contrib/inventory/vmware_inventory.py @@ -669,7 +669,7 @@ class VMWareInventory(object): methods = dir(vobj) methods = [str(x) for x in methods if not x.startswith('_')] methods = [x for x in methods if x not in self.bad_types] - methods = [x for x in methods if not x.lower() in self.skip_keys] + methods = [x for x in methods if not inkey + '.' + x.lower() in self.skip_keys] methods = sorted(methods) for method in methods: