Set ha host to false when no ha tag is enabled

This commit is contained in:
Alena Prokharchyk 2012-04-25 11:04:07 -07:00
parent a244fb6d42
commit c7cbae4c48
1 changed files with 5 additions and 0 deletions

View File

@ -611,8 +611,13 @@ public class ApiResponseHelper implements ResponseGenerator {
if (haTag != null && !haTag.isEmpty() && hostTags != null && !hostTags.isEmpty()) {
if (haTag.equalsIgnoreCase(hostTags)) {
hostResponse.setHaHost(true);
} else {
hostResponse.setHaHost(false);
}
} else {
hostResponse.setHaHost(false);
}
hostResponse.setHypervisorVersion(host.getHypervisorVersion());
String cpuAlloc = decimalFormat.format(((float) cpu / (float) (host.getCpus() * host.getSpeed())) * 100f) + "%";