You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:45:13 UTC

[GitHub] [cloudstack] shwstppr commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

shwstppr commented on a change in pull request #5387:
URL: https://github.com/apache/cloudstack/pull/5387#discussion_r699195385



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI
   
   ```
   (local) 🙉 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=
   🙈 Error: (HTTP 431, error code 4350) bootmode must be specified for the VM with boot type: UEFI. Valid values are: [LEGACY, SECURE]
   ```




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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org