sureshanaparti commented on a change in pull request #3638: UEFI Support on CloudStack URL: https://github.com/apache/cloudstack/pull/3638#discussion_r358759670
########## File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java ########## @@ -257,12 +280,35 @@ public Long getDomainId() { } } } + if(getBootType() != null){ // export to get + if(getBootType() == ApiConstants.BootType.UEFI) { + customparameterMap.put(getBootType().toString(), getBootMode().toString()); + } + } + if (rootdisksize != null && !customparameterMap.containsKey("rootdisksize")) { customparameterMap.put("rootdisksize", rootdisksize.toString()); } return customparameterMap; } + + public ApiConstants.BootMode getBootMode() { + if (StringUtils.isNotBlank(bootMode)) { + try { + String mode = bootMode.trim().toUpperCase(); + return ApiConstants.BootMode.valueOf(mode); + } catch (IllegalArgumentException e) { + String errMesg = "Invalid bootMode " + bootMode + "Specified for vm " + getName() + + " Valid values are: LEGACY,SECURE "; Review comment: Use the enum for valid values. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services