Tal Nisan has posted comments on this change.
Change subject: core: UpdateVmDiskCommand canDoAction cleanup
......................................................................
Patch Set 2: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
Line 63: if (!isDiskExist(oldDisk)) {
Line 64: return false;
Line 65: }
Line 66:
Line 67: List<VM> vmsDiskPluggedTo =
getVmDAO().getForDisk(oldDisk.getId()).get(Boolean.TRUE);
The thing is to show that these are all the VMs that the disk is plugged into,
this is the shortest comprehensible way I've found
Line 68:
Line 69: if (vmsDiskPluggedTo != null && !vmsDiskPluggedTo.isEmpty()) {
Line 70: buildSharedLockMap(vmsDiskPluggedTo);
Line 71: buildExclusiveLockMap(vmsDiskPluggedTo);
Line 156: if (DiskStorageType.LUN == oldDisk.getDiskStorageType()) {
Line 157: return true;
Line 158: }
Line 159: boolean isDiskUpdatedToShareable = newDisk.isShareable();
Line 160: boolean isOldDiskShaerable = oldDisk.isShareable();
Damn... hehe, gimme a sec
Line 161:
Line 162: // Check if VM is not during snapshot.
Line 163: if (getSnapshotDao().exists(getVmId(),
SnapshotStatus.IN_PREVIEW)) {
Line 164:
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW);
--
To view, visit http://gerrit.ovirt.org/10386
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id74d24f991a1c00b92dec72125148a6a9fa75d5f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[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