cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rafaelweingartner commented on a change in pull request #2315: A comprehensive solution for CLOUDSTACK-9025 and CLOUDSTACK-10128.
Date Thu, 01 Jan 1970 00:00:00 GMT
rafaelweingartner commented on a change in pull request #2315: A comprehensive solution for
CLOUDSTACK-9025 and CLOUDSTACK-10128.
URL: https://github.com/apache/cloudstack/pull/2315#discussion_r159868750
 
 

 ##########
 File path: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java
 ##########
 @@ -167,35 +170,62 @@ public boolean trackVmHostChange() {
 
     @Override
     public Pair<Boolean, Long> getCommandHostDelegation(long hostId, Command cmd) {
 
 Review comment:
   Actually, it depends on how you count. Normally you would need to build a decision graph
to calculate. However, the most import thing in my opinion is the removal of 3/4 conditionals
one inside the other. And More specifically this block:
   ```
   if (hypervisorVersion != null && !hypervisorVersion.equalsIgnoreCase("6.1.0"))
{
   -                        if (!(hypervisorVersion.equalsIgnoreCase("6.2.0") &&
   -                                !(snapshotHotFixVersion != null && snapshotHotFixVersion.equalsIgnoreCase(XenserverConfigs.XSHotFix62ESP1004))))
{
   -                            return new Pair<Boolean, Long>(Boolean.TRUE, new Long(host.getId()));
   -                        }
   -                    }
   ````
   
   Those negations altogether do not compute well in my mind...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message