mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fixing critical bug to remove only the specified Host instead of the entire Host cluster (#32642)
This commit is contained in:
parent
9942ea9319
commit
97b0e360b0
@ -3574,12 +3574,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