mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Fixing critical bug to remove only the specified Host instead of the entire Host cluster (#32641)
This commit is contained in:
parent
aade963c55
commit
bc2cabb924
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user