mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
VMware: Check return of FindByInventoryPath (#55282)
Check return value of FindByInventoryPath API which is used for finding desired folder to deploy OVF. Fixes: #54823 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -370,6 +370,8 @@ class VMwareDeployOvf:
|
||||
|
||||
if self.params['folder']:
|
||||
folder = self.si.searchIndex.FindByInventoryPath(self.params['folder'])
|
||||
if not folder:
|
||||
self.module.fail_json(msg="Unable to find the specified folder %(folder)s" % self.params)
|
||||
else:
|
||||
folder = datacenter.vmFolder
|
||||
|
||||
|
||||
Reference in New Issue
Block a user