Allon Mureinik has posted comments on this change. Change subject: [wip] core: refactor MoveOrCopy/RemoveImage commands and parameters ......................................................................
Patch Set 2: I would prefer that you didn't submit this (3 inline comments) 1. See inline - I think you may have forgotten some refactoring here. 2. This is quite a substantional patch. How about some unit tests? .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveImageCommand.java Line 82: getParameters().getStorageDomainId())); Line 83: Line 84: if (getParameters().getPerformDbOperationsStage() == PerformOperationStage.EXECUTION Line 85: && getParameters().getParentCommand() != VdcActionType.RemoveVmFromImportExport Line 86: && getParameters().getParentCommand() != VdcActionType.RemoveVmTemplateFromImportExport) { why do we still have a condition on getParentCommand() ? Line 87: removeImageFromDB(false); Line 88: } Line 89: } else { Line 90: log.warn("DiskImage is null, nothing to remove"); Line 287: @Override Line 288: protected VDSReturnValue performImageVdsmOperation() { Line 289: boolean isShouldBeLocked = getParameters().getPerformDbOperationsStage() != PerformOperationStage.NEVER Line 290: && getParameters().getParentCommand() != VdcActionType.RemoveVmFromImportExport Line 291: && getParameters().getParentCommand() != VdcActionType.RemoveVmTemplateFromImportExport; why do we still have a condition on getParentCommand() ? Line 292: if (isShouldBeLocked) { Line 293: // the image status should be set to ILLEGAL, so that in case compensation runs the image status will Line 294: // be revert to be ILLEGAL, as we can't tell whether the task started on vdsm side or not. Line 295: getDiskImage().setImageStatus(ImageStatus.ILLEGAL); .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/PerformOperationStage.java Line 1: package org.ovirt.engine.core.common.businessentities; Line 2: Line 3: public enum PerformOperationStage { I think the code that uses it is clear, but I don't like having to do "find usages" just to understand a class. Some javadoc would be nice Line 4: EXECUTION, TASKS_ENDED, NEVER; -- To view, visit http://gerrit.ovirt.org/12689 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I92036258512d385b7296e1f75d9dcebfdd129d4a Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Anonymous Coward #1000370 Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches