def search_cluster(self, datacenter_name, cluster_name, esxi_hostname): """ Search cluster in vCenter Returns: host and cluster object """ return find_host_by_cluster_datacenter(self.module, self.content, datacenter_name, cluster_name, esxi_hostname)
def check_rp_state(self): self.host_obj, self.cluster_obj = find_host_by_cluster_datacenter(self.module, self.content, self.datacenter, self.cluster, self.hostname) self.resource_pool_obj = self.select_resource_pool(self.host_obj) if self.resource_pool_obj is None: return 'absent' else: return 'present'