Maor Lipchuk has posted comments on this change.

Change subject: core: Fix err msg - disk locked on  MoveOrCopyDisk
......................................................................


Patch Set 6: (2 inline comments)

minor comments/suggestions.

p.s I would consider using one enum message for locked disks instead 
ACTION_TYPE_FAILED_DISK_IS_LOCKED and ACTION_TYPE_FAILED_DISK_ARE_LOCKED, but 
for now is not that relevant since it is not related to the patch.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
Line 104:         DiskImage diskImage = getImage();
Line 105:         if (diskImage.getimageStatus() == ImageStatus.LOCKED) {
Line 106:             if (getParameters().getOperation() == 
ImageOperation.Move) {
Line 107:                 
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_DISK_IS_LOCKED);
Line 108:                 addCanDoActionMessage(String.format("$%1$s %2$s", 
"diskAlias", diskImage.getDiskAlias()));
Consider using a constant for the key "diskAlias", this way changing the key in 
the future, might be easier then find/replace.
Line 109:             } else {
Line 110:                 
addCanDoActionMessage(VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED);
Line 111:             }
Line 112:             return false;


....................................................
Commit Message
Line 7: core: Fix err msg - disk locked on  MoveOrCopyDisk
Line 8: 
Line 9: This fix is related to Bug-Url: https://bugzilla.redhat.com/865551
Line 10: 
Line 11: It fixes an error message displayed when trying to move or dopy a disk
s/dopy/copy
Line 12: while it's locked. Previous message showed multiple disks
Line 13: locked message (should only be one), and disks_aliases was not
Line 14: substituted with actual disk alias. Now the disk alias is also 
displayed.
Line 15: 


--
To view, visit http://gerrit.ovirt.org/8694
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic91e8718181db7b55b59ca53ddc86e8f76ebd83c
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@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

Reply via email to