DaanHoogland commented on a change in pull request #4228:
URL: https://github.com/apache/cloudstack/pull/4228#discussion_r465667554
##########
File path:
server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
##########
@@ -474,7 +477,8 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean
isForced, boolean isForc
_resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
try {
- ShutdownCommand cmd = new
ShutdownCommand(ShutdownCommand.DeleteHost, null);
+ ShutdownCommand cmd = AddHostOnServiceRestart.value() ? new
ShutdownCommand(ShutdownCommand.DeleteHost, null, false) :
+ new ShutdownCommand(ShutdownCommand.DeleteHost, "Cleaning
up zone/pod/cluster details for host", true);
Review comment:
general jist looks good, i'd rather have the tristate operator in the
parameter passing then the whole contructor invocation ? note the ?)
```suggestion
ShutdownCommand cmd = new
ShutdownCommand(ShutdownCommand.DeleteHost, null,
AddHostOnServiceRestart.value() ? false : true);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]