Roy Golan has posted comments on this change.

Change subject: core, webadmin, restapi: Fix VM creation with blank template
......................................................................


Patch Set 12:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
Line 1135:         OsRepository osRepository = 
SimpleDependecyInjector.getInstance().get(OsRepository.class);
Line 1136: 
Line 1137:         // Choose a proper default OS according to the cluster 
architecture
Line 1138:         if (getParameters().getVmStaticData().getOsId() == 
OsRepository.AUTO_SELECT_OS) {
Line 1139:             if (getVdsGroup().getArchitecture() != 
ArchitectureType.undefined) {
there's a canDo for that already in line 392 so you can drop it
Line 1140:                 Integer defaultOs = 
osRepository.getDefaultOSes().get(getVdsGroup().getArchitecture());
Line 1141: 
Line 1142:                 getParameters().getVmStaticData().setOsId(defaultOs);
Line 1143:             }


Line 1142:                 getParameters().getVmStaticData().setOsId(defaultOs);
Line 1143:             }
Line 1144:         }
Line 1145: 
Line 1146:         // Choose a proper default display type according to the 
cluster architecture
since VM couldn't be added without an architecture the first predicate is 
always true

so only left with 

if (displayType ==null)
Line 1147:         if (getParameters().getVmStaticData().getOsId() != 
OsRepository.AUTO_SELECT_OS &&
Line 1148:                 
getParameters().getVmStaticData().getDefaultDisplayType() == null) {
Line 1149:             DisplayType defaultDisplayType =
Line 1150:                     
osRepository.getDisplayTypes(getParameters().getVmStaticData().getOsId(),


-- 
To view, visit http://gerrit.ovirt.org/20667
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I880e5940c7244476e477e098445a47210ea08b5d
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vitor.l...@eldorado.org.br>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<gustavo.pedr...@eldorado.org.br>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianc...@eldorado.org.br>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.l...@eldorado.org.br>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to