Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,6 @@ public void setDetails(Map details) {
detailsCopy.remove("username");
detailsCopy.remove("password");

if (detailsCopy.containsKey(Host.HOST_UEFI_ENABLE)) {
this.setUefiCapabilty(Boolean.parseBoolean((String) detailsCopy.get(Host.HOST_UEFI_ENABLE)));
detailsCopy.remove(Host.HOST_UEFI_ENABLE);
} else {
this.setUefiCapabilty(new Boolean(false)); // in case of existing host which is not scanned for UEFI capability
}

this.details = detailsCopy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.EnumSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.inject.Inject;
Expand Down Expand Up @@ -230,10 +231,18 @@ public HostResponse newHostResponse(HostJoinVO host, EnumSet<HostDetails> detail
}
}

Map<String, String> hostDetails = hostDetailsDao.findDetails(host.getId());
if (hostDetails != null) {
if (hostDetails.containsKey(Host.HOST_UEFI_ENABLE)) {
hostResponse.setUefiCapabilty(Boolean.parseBoolean((String) hostDetails.get(Host.HOST_UEFI_ENABLE)));
} else {
hostResponse.setUefiCapabilty(new Boolean(false));
}
}
if (details.contains(HostDetails.all) && host.getHypervisorType() == Hypervisor.HypervisorType.KVM) {
//only kvm has the requirement to return host details
try {
hostResponse.setDetails(hostDetailsDao.findDetails(host.getId()));
hostResponse.setDetails(hostDetails);
} catch (Exception e) {
s_logger.debug("failed to get host details", e);
}
Expand Down