Skip to content

Commit

Permalink
ISSUE-1290 Remove cluster host fm Pools (#1362)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
n3pjk authored Jun 23, 2022
1 parent c673d75 commit b8e9b49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/modules/vmware_content_deploy_ovf_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/vmware_content_deploy_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b8e9b49

Please sign in to comment.