Vered Volansky has posted comments on this change.
Change subject: core: Consolidate vm down check when removing disk
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
Line 79:
Line 80: buildSharedLockMap();
Line 81:
Line 82: return acquireLockInternal() &&
Line 83: validateAllVmsForDiskAreDown() &&
This is done either way now, which looks logical. Just making sure not by
mistake.
Line 84: disk.getDiskStorageType() == DiskStorageType.IMAGE ?
Line 85: canRemoveDiskBasedOnImageStorageCheck() : true;
Line 86: }
Line 87:
Line 81:
Line 82: return acquireLockInternal() &&
Line 83: validateAllVmsForDiskAreDown() &&
Line 84: disk.getDiskStorageType() == DiskStorageType.IMAGE ?
Line 85: canRemoveDiskBasedOnImageStorageCheck() : true;
Now this is (mild) abuse. Consider checking the DiskStorageType inside
canRemoveDiskBasedOnImageStorageCheck() and just return the latter.
Line 86: }
Line 87:
Line 88: private boolean validateAllVmsForDiskAreDown() {
Line 89: if (disk.getVmEntityType() == VmEntityType.VM) {
--
To view, visit http://gerrit.ovirt.org/11013
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1a23e1f8d129bf19c1d217c7b9201dc17a2d2c0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[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