mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
VMware: Refactor vmware_host_facts (#39273)
* Updated documentation * Error handling in find_obj * Updated return facts example Fixes: #39265 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
693065da1e
commit
0d29826e52
2 changed files with 130 additions and 91 deletions
|
@ -1020,7 +1020,7 @@ class PyVmomi(object):
|
|||
if not self.is_vcenter():
|
||||
hosts = get_all_objs(self.content, [vim.HostSystem]).keys()
|
||||
if hosts:
|
||||
host_obj_list.append(hosts[0])
|
||||
host_obj_list.append(list(hosts)[0])
|
||||
else:
|
||||
if cluster_name:
|
||||
cluster_obj = self.find_cluster_by_name(cluster_name=cluster_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue