[2.9] VMware: Fix cluster argument of module vmware_content_deploy_template

(cherry picked from commit 98f19c970f)

Signed-off-by: gp <gp@gparent.net>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/68620/merge
gp 6 years ago committed by Matt Clay
parent 64d8947f7f
commit 859cdc8695

@ -0,0 +1,2 @@
bugfixes:
- "`vmware_content_deploy_template`'s `cluster` argument no longer fails with an error message about resource pools."

@ -188,7 +188,7 @@ class VmwareContentDeployTemplate(VmwareRestClient):
# Find the Cluster by the given Cluster name
self.cluster_id = None
if self.cluster:
self.cluster_id = self.get_resource_pool_by_name(self.datacenter, self.resourcepool)
self.cluster_id = self.get_cluster_by_name(self.datacenter, self.cluster)
if not self.cluster_id:
self.module.fail_json(msg="Failed to find the Cluster %s" % self.cluster)
# Create VM placement specs

Loading…
Cancel
Save