Omer Frenkel has posted comments on this change. Change subject: core:(2) Editing of template version for pools ......................................................................
Patch Set 11: (3 comments) https://gerrit.ovirt.org/#/c/36508/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVmDataByPoolNameQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVmDataByPoolNameQuery.java: Line 24: .getVmPoolDao() Line 25: .getVmDataFromPoolByPoolName(getParameters().getName(), getUserID(), getParameters().isFiltered()); Line 26: Line 27: if (vm != null) { Line 28: boolean isLatestLoad = vm.isUseLatestVersion(); there is too much logic here to be duplicated with previous query (GetVmDataByPoolIdQuery) please reuse (unless i miss some big difference except the first call that gets the vm) Line 29: boolean loadTemplateData = false; Line 30: Guid vmtGuid = vm.getVmtGuid(); Line 31: if (vm.isNextRunConfigurationExists()) { Line 32: VdcQueryReturnValue https://gerrit.ovirt.org/#/c/36508/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java: Line 155: if (isRunningConfigurationNeeded()) { Line 156: createNextRunSnapshot(); Line 157: } Line 158: Line 159: oldVm = getVm(); so is this still needed? Line 160: VmHandler.warnMemorySizeLegal(getParameters().getVm().getStaticData(), getVdsGroup().getCompatibilityVersion()); Line 161: getVmStaticDAO().incrementDbGeneration(getVm().getId()); Line 162: newVmStatic = getParameters().getVmStaticData(); Line 163: newVmStatic.setCreationDate(oldVm.getStaticData().getCreationDate()); https://gerrit.ovirt.org/#/c/36508/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmPoolWithVmsCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmPoolWithVmsCommand.java: Line 91: Line 92: private void updatePoolVms(List<VM> vmsInPool) { Line 93: boolean isUpdatedPoolLatest = getParameters().getVmStaticData().isUseLatestVersion(); // new latest value Line 94: Line 95: if (vmsInPool != null && vmsInPool.size()!=0) { please use !empty() Line 96: Line 97: // Check one VM in order to decide if template version was changed Line 98: boolean isUpdateNeeded = isUpdateVmRequired(vmsInPool.get(0)); Line 99: -- To view, visit https://gerrit.ovirt.org/36508 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2249cfea12ffbab008c162d52928df782f5f9d85 Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eldan Shachar <eshac...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Eldan Shachar <eshac...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches