sureshanaparti commented on a change in pull request #3638: UEFI Support on
CloudStack
URL: https://github.com/apache/cloudstack/pull/3638#discussion_r356213475
##########
File path: server/src/main/java/com/cloud/deploy/FirstFitPlanner.java
##########
@@ -218,6 +230,20 @@ public int compare(Long o1, Long o2) {
});
}
+ private Long getHostsByCapability(List<Long> hostList, String
hostCapability) {
+ int totalHostswithCapability = 0;
+ for (Long host : hostList) { //TODO: Fix this in single query instead
of polling request for each Host
+ Map<String, String> details = hostDetailsDao.findDetails(host);
+ if (details.containsKey(Host.HOST_UEFI_ENABLE)) {
+ if
(details.get(Host.HOST_UEFI_ENABLE).equalsIgnoreCase("Yes")) {
+ totalHostswithCapability++;
Review comment:
Better return here when a host found with UEFI capability as that satisfies
the return cond.
----------------------------------------------------------------
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]
With regards,
Apache Git Services