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>
pull/4420/head
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
1 changed files with 10 additions and 1 deletions

View File

@ -1293,7 +1293,16 @@ class PyVmomiHelper(PyVmomi):
# abort if no strategy was successful # abort if no strategy was successful
if f_obj is None: 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 destfolder = f_obj
if self.params['template']: if self.params['template']: