1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

VMware: Add debug details for error (#33337)

This fix adds debugging details for 'no folder found' error.
This will allow to debug the user's setup easily.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-11-28 17:58:12 +05:30 committed by GitHub
parent 717193b67f
commit bb3991218e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1293,7 +1293,16 @@ class PyVmomiHelper(PyVmomi):
# abort if no strategy was successful
if f_obj is None:
self.module.fail_json(msg='No folder matched the path: %(folder)s' % self.params)
# Add some debugging values in failure.
details = {
'datacenter': datacenter.name,
'datacenter_path': dcpath,
'folder': self.params['folder'],
'full_search_path': fullpath,
}
self.module.fail_json(msg='No folder %s matched in the search path : %s' % (self.params['folder'], fullpath),
details=details)
destfolder = f_obj
if self.params['template']: