GabrielBrascher commented on a change in pull request #4220:
URL: https://github.com/apache/cloudstack/pull/4220#discussion_r459838472
##########
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:
@ravening thanks **+1** :)
Can you please take a look at line
[314](https://github.com/apache/cloudstack/blob/7febf17aa8c8ba6403deeb160a4af5f6dda5111c/server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java#L314),
I think that it could also benefit from the created method
`calculateResourceAllocatedPercentage`.
----------------------------------------------------------------
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]