davidjumani commented on a change in pull request #4478:
URL: https://github.com/apache/cloudstack/pull/4478#discussion_r526615617
##########
File path: server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java
##########
@@ -321,7 +321,7 @@ public HostForMigrationResponse
newHostForMigrationResponse(HostJoinVO host, Enu
hostResponse.setMemoryTotal(host.getTotalMemory());
Float memWithOverprovisioning = host.getTotalMemory() *
ApiDBUtils.getMemOverprovisioningFactor(host.getClusterId());
hostResponse.setMemWithOverprovisioning(decimalFormat.format(memWithOverprovisioning));
- hostResponse.setMemoryAllocated(decimalFormat.format((float)
mem / memWithOverprovisioning * 100.0f) +"%");
+ hostResponse.setMemoryAllocated(mem);
Review comment:
It will but we can introduce two new fields `memoryallocaedpercentage` &
`cpuallocaedpercentage` to compensate.
This will ensure that the response for both HostResponse and
HostForMigrationResponse will be the same. Sounds good @rhtyd ?
----------------------------------------------------------------
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]