Fixing critical bug to remove only the specified Host instead of the entire Host cluster (#32641)

This commit is contained in:
Nitin Madhok 2016-04-18 10:47:54 -04:00 committed by Mike Place
parent aade963c55
commit bc2cabb924

View File

@ -3481,12 +3481,12 @@ def remove_host(kwargs=None, call=None):
)
try:
if isinstance(host_ref.parent, vim.ComputeResource):
# This is a standalone host system
task = host_ref.parent.Destroy_Task()
else:
if isinstance(host_ref.parent, vim.ClusterComputeResource):
# This is a host system that is part of a Cluster
task = host_ref.Destroy_Task()
else:
# This is a standalone host system
task = host_ref.parent.Destroy_Task()
salt.utils.vmware.wait_for_task(task, host_name, 'remove host', log_level='info')
except Exception as exc:
log.error(