DaanHoogland commented on a change in pull request #3638: UEFI Support on 
CloudStack
URL: https://github.com/apache/cloudstack/pull/3638#discussion_r391673520
 
 

 ##########
 File path: 
api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java
 ##########
 @@ -499,6 +503,14 @@ 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
+        }
 
 Review comment:
   please extract to a method. i.e. determineUefiCapability()

----------------------------------------------------------------
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

Reply via email to