Omer Frenkel has posted comments on this change. Change subject: core, engine, restapi: Proper default migration policies for ppc64 ......................................................................
Patch Set 12: (3 comments) http://gerrit.ovirt.org/#/c/21643/12/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java: Line 178: } Line 179: VmHandler.updateDefaultTimeZone(parameters.getVmStaticData()); Line 180: Line 181: // Fill the migration policy if it was omitted Line 182: if (getParameters().getVmStaticData().getMigrationSupport() == null) { need to check that getVdsGroup() != null because this is executed before canDoAction, we cant be sure the user supplied valid cluster id Line 183: boolean isMigrationSupported = Line 184: FeatureSupported.isMigrationSupported(getVdsGroup().getArchitecture(), Line 185: getVdsGroup().getcompatibility_version()); Line 186: Line 187: MigrationSupport migrationSupport = Line 188: isMigrationSupported ? MigrationSupport.MIGRATABLE : MigrationSupport.PINNED_TO_HOST; Line 189: Line 190: getParameters().getVmStaticData().setMigrationSupport(migrationSupport); Line 191: } it would be nicer to extract this to a method, also it should be executed inside the "if (parameters.getVmStaticData() != null)" above Line 192: } Line 193: Line 194: @Override Line 195: protected LockProperties applyLockProperties(LockProperties lockProperties) { http://gerrit.ovirt.org/#/c/21643/12/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsGroupOperationCommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsGroupOperationCommandBase.java: Line 59: return getVdsGroup().getArchitecture(); Line 60: } Line 61: Line 62: protected void updateMigrateOnError() { Line 63: if (getVdsGroup().getMigrateOnError() == null) { need to check getVdsGroup() != null Line 64: boolean isMigrationSupported = Line 65: FeatureSupported.isMigrationSupported(getArchitecture(), Line 66: getVdsGroup().getcompatibility_version()); Line 67: -- To view, visit http://gerrit.ovirt.org/21643 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib34c4a01fe0c667bafc47bf70b33bb2990ffb7d3 Gerrit-PatchSet: 12 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vitor de Lima <vdel...@redhat.com> 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: Michal Skrivanek <mskri...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vitor de Lima <vdel...@redhat.com> 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