Vered Volansky has posted comments on this change.
Change subject: core: AddDisk preview validation
......................................................................
Patch Set 1: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsValidator.java
Line 28: * Return if the VM is in preview (running currently on a snapshot
other than the active one).
Line 29: *
Line 30: * @param vmId
Line 31: * The VM to check for.
Line 32: * @return Is the VM during a snapshot operation or not.
copied and pasted, not relevant anymore.
Line 33: */
Line 34: public ValidationResult vmNotInPreview(Guid vmId) {
Line 35: return vmNotInState(vmId, SnapshotStatus.IN_PREVIEW,
VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW);
Line 36: }
Line 35: return vmNotInState(vmId, SnapshotStatus.IN_PREVIEW,
VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW);
Line 36: }
Line 37:
Line 38: /**
Line 39: * Return if the VM has a snapshot in the given status.
/if/whether. Or any other better English.
Also for the two methods above.
Line 40: *
Line 41: * @param vmId
Line 42: * The VM to check for.
Line 43: * @param status
Line 44: * The status of a snapshot to look for
Line 45: * @param msg
Line 46: * The validation error to return if the snapshot exists
Line 47: *
Line 48: * @return Is the VM during a snapshot operation or not.
copied and pasted, not relevant anymore.
Line 49: */
Line 50: private ValidationResult vmNotInState(Guid vmId, SnapshotStatus
status, VdcBllMessages msg) {
Line 51: if (getSnapshotDao().exists(vmId, status)) {
Line 52: return new ValidationResult(msg);
Line 46: * The validation error to return if the snapshot exists
Line 47: *
Line 48: * @return Is the VM during a snapshot operation or not.
Line 49: */
Line 50: private ValidationResult vmNotInState(Guid vmId, SnapshotStatus
status, VdcBllMessages msg) {
State in method name, status as argument.
If you fix make sure the JDOC still complies.
Line 51: if (getSnapshotDao().exists(vmId, status)) {
Line 52: return new ValidationResult(msg);
Line 53: }
Line 54:
--
To view, visit http://gerrit.ovirt.org/11179
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib282279a4b938d6fb3b08e9b2d127af4653bd51c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches