From 32cf69c00a72b424d2bbeb9b31ad22d5cdd2bd81 Mon Sep 17 00:00:00 2001 From: jctanner Date: Thu, 28 Sep 2017 20:36:54 -0400 Subject: [PATCH] Use the group-d1 moId instead of i8ln based names to identify the root folder. (#31077) Addresses #29043 --- lib/ansible/module_utils/vmware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/vmware.py b/lib/ansible/module_utils/vmware.py index bb6bfd5775..102f1e6b60 100644 --- a/lib/ansible/module_utils/vmware.py +++ b/lib/ansible/module_utils/vmware.py @@ -235,7 +235,7 @@ def compile_folder_path_for_object(vobj): thisobj = vobj while hasattr(thisobj, 'parent'): thisobj = thisobj.parent - if thisobj.name == 'Datacenters': + if thisobj._moId == 'group-d1': break if isinstance(thisobj, vim.Folder): paths.append(thisobj.name)