ravening commented on a change in pull request #4220:
URL: https://github.com/apache/cloudstack/pull/4220#discussion_r459883908



##########
File path: server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java
##########
@@ -330,10 +330,10 @@ public HostForMigrationResponse 
newHostForMigrationResponse(HostJoinVO host, Enu
 
                 hostResponse.setHypervisorVersion(host.getHypervisorVersion());
 
-                Float cpuWithOverprovisioning = new Float(host.getCpus() * 
host.getSpeed() * ApiDBUtils.getCpuOverprovisioningFactor(host.getClusterId()));
-                String cpuAlloc = decimalFormat.format(((float)cpu / 
cpuWithOverprovisioning * 100f)).toString() + "%";
+                float cpuWithOverprovisioning = new Float(host.getCpus() * 
host.getSpeed() * ApiDBUtils.getCpuOverprovisioningFactor(host.getClusterId()));
+                String cpuAlloc = decimalFormat.format(((float)cpu / 
cpuWithOverprovisioning * 100f)) + "%";

Review comment:
       @GabrielBrascher I didn't make changes in line 314 because it has 
different behavior compared to line 165.
   I have mentioned the same in issue #4221 also. list hosts api returns 
absolute value where as findhostsformigration returns percentage. If we decided 
what to return then I can make changes in these two places also




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


Reply via email to