From b8e9b49715bc292f901cf985be52337553534b04 Mon Sep 17 00:00:00 2001 From: n3pjk Date: Thu, 23 Jun 2022 12:24:20 -0400 Subject: [PATCH] ISSUE-1290 Remove cluster host fm Pools (#1362) ISSUE-1290 Remove cluster host fm Pools SUMMARY Fixes #1290 The two template deployment modules both require cluster and host when attempting to identify a resource pool. I have removed that constraint, as the lookup function defaults cluster and host to None if not provided. ISSUE TYPE Bugfix Pull Request COMPONENT NAME vmware_content_deploy_ovf_template vmware_content_deploy_template ADDITIONAL INFORMATION Reviewed-by: Mario Lenz --- plugins/modules/vmware_content_deploy_ovf_template.py | 2 +- plugins/modules/vmware_content_deploy_template.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/vmware_content_deploy_ovf_template.py b/plugins/modules/vmware_content_deploy_ovf_template.py index 8142ee9c9..2db92a7da 100644 --- a/plugins/modules/vmware_content_deploy_ovf_template.py +++ b/plugins/modules/vmware_content_deploy_ovf_template.py @@ -260,7 +260,7 @@ def deploy_vm_from_ovf_template(self): self._resourcepool_id = cluster_obj.resource_pool # Find the resourcepool by the given resourcepool name - if self.resourcepool and self.cluster and self.host: + if self.resourcepool: self._resourcepool_id = self.get_resource_pool_by_name(self.datacenter, self.resourcepool, self.cluster, self.host) if not self._resourcepool_id: self._fail(msg="Failed to find the resource_pool %s" % self.resourcepool) diff --git a/plugins/modules/vmware_content_deploy_template.py b/plugins/modules/vmware_content_deploy_template.py index c004dec88..7182cae9e 100644 --- a/plugins/modules/vmware_content_deploy_template.py +++ b/plugins/modules/vmware_content_deploy_template.py @@ -279,7 +279,7 @@ def deploy_vm_from_template(self, power_on=False): self._resourcepool_id = cluster_obj.resource_pool # Find the resourcepool by the given resourcepool name - if self.resourcepool and self.cluster and self.host: + if self.resourcepool: self._resourcepool_id = self.get_resource_pool_by_name(self.datacenter, self.resourcepool, self.cluster, self.host) if not self._resourcepool_id: self._fail(msg="Failed to find the resource_pool %s" % self.resourcepool)