DaanHoogland commented on code in PR #12288:
URL: https://github.com/apache/cloudstack/pull/12288#discussion_r2630517507


##########
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:
##########
@@ -1550,11 +1550,12 @@ private ServiceOfferingVO 
getServiceOfferingForImportInstance(Long serviceOfferi
     protected VMTemplateVO getTemplateForImportInstance(Long templateId, 
Hypervisor.HypervisorType hypervisorType) {
         VMTemplateVO template;
         if (templateId == null) {
-            template = templateDao.findByName(VM_IMPORT_DEFAULT_TEMPLATE_NAME);
+            String templateName = (Hypervisor.HypervisorType.KVM == 
hypervisorType) ? KVM_VM_IMPORT_DEFAULT_TEMPLATE_NAME : 
VM_IMPORT_DEFAULT_TEMPLATE_NAME;

Review Comment:
   ```suggestion
               String templateName = 
(Hypervisor.HypervisorType.KVM.equals(hypervisorType)) ? 
KVM_VM_IMPORT_DEFAULT_TEMPLATE_NAME : VM_IMPORT_DEFAULT_TEMPLATE_NAME;
   ```
   
   (in case of a null)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to