VMware: get_all_host_objs accepts list of host (#55146)

vmware_portgroup accepts list of hosts, get_all_host_objs API modified
to accept list of hosts.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-04-13 04:05:35 +05:30 committed by Jill R
parent 216cd86cb8
commit 6ff4547489
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- vmware_portgroup accepts list of ESXi hostsystem. Modified get_all_host_objs API to accept list of hostsystems.

View file

@ -1109,7 +1109,7 @@ class PyVmomi(object):
for host in esxi_host_name:
esxi_host_obj = self.find_hostsystem_by_name(host_name=host)
if esxi_host_obj:
host_obj_list = [esxi_host_obj]
host_obj_list.append(esxi_host_obj)
else:
self.module.fail_json(changed=False, msg="ESXi '%s' not found" % host)