Skip to content

Commit be784db

Browse files
tanganelliloreDaanHoogland
authored andcommitted
fix template id unmanaged vm (apache#12288)
* fix template id unmanaged vm * Update == to equals Co-authored-by: dahn <daan.hoogland@gmail.com> --------- Co-authored-by: dahn <daan.hoogland@gmail.com>
1 parent de8fc57 commit be784db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,7 @@ private ServiceOfferingVO getServiceOfferingForImportInstance(Long serviceOfferi
14861486
protected VMTemplateVO getTemplateForImportInstance(Long templateId, Hypervisor.HypervisorType hypervisorType) {
14871487
VMTemplateVO template;
14881488
if (templateId == null) {
1489-
boolean isKVMHypervisor = Hypervisor.HypervisorType.KVM.equals(hypervisorType);
1490-
String templateName = (isKVMHypervisor) ? KVM_VM_IMPORT_DEFAULT_TEMPLATE_NAME : VM_IMPORT_DEFAULT_TEMPLATE_NAME;
1489+
String templateName = (Hypervisor.HypervisorType.KVM.equals(hypervisorType)) ? KVM_VM_IMPORT_DEFAULT_TEMPLATE_NAME : VM_IMPORT_DEFAULT_TEMPLATE_NAME;
14911490
template = templateDao.findByName(templateName);
14921491
if (template == null) {
14931492
template = createDefaultDummyVmImportTemplate(isKVMHypervisor);

0 commit comments

Comments
 (0)