JoaoJandre commented on code in PR #13789:
URL: https://github.com/apache/cloudstack/pull/13789#discussion_r3720796051


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtValidateKbossVmCommandWrapper.java:
##########
@@ -92,7 +92,7 @@ private boolean waitForBoot(ValidateKbossVmCommand cmd, 
Domain vm) throws Libvir
                     return true;
                 }
             } catch (LibvirtException ex) {
-                if 
(!ex.getMessage().contains(LibvirtComputingResource.AGENT_IS_NOT_CONNECTED)) {
+                if 
(!LibvirtComputingResource.AGENT_UNRESPONSIVE_ERROR_ORDINAL.equals(ex.getError().getCode().ordinal()))
 {

Review Comment:
   I have to agree with the robot in this. Using the enum is much better then 
using the ordinal.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to