Allon Mureinik has posted comments on this change.

Change subject: core: Add validation for locked template
......................................................................


Patch Set 3: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
Line 42:         boolean returnValue = false;
Line 43:         mOldTemplate = 
DbFacade.getInstance().getVmTemplateDao().get(getVmTemplate().getId());
Line 44:         VmTemplateHandler.UpdateDisksFromDb(mOldTemplate);
Line 45:         if (mOldTemplate != null) {
Line 46:             if (mOldTemplate.getstatus() == VmTemplateStatus.Locked) {
If you're checking if the VM is locked, you should also lock it in the 
executeAction()
Line 47:                 
addCanDoActionMessage(VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED);
Line 48:                 return false;
Line 49:             }
Line 50:             if 
(VmTemplateHandler.BlankVmTemplateId.equals(mOldTemplate.getId())) {


....................................................
Commit Message
Line 6: 
Line 7: core: Add validation for locked template
Line 8: 
Line 9: Engine should validate the template status before updating it, same as
Line 10: being done in the GUI.
s/same as being done in the GUI./like is done in the GUI/
Line 11: The proposed fix is adding a validation for template status.
Line 12: 
Line 13: Change-Id: If4e25d5e9badd3169b2b5a65c3a7e745adadf379
Line 14: Bug-Url: https://bugzilla.redhat.com/856515


Line 7: core: Add validation for locked template
Line 8: 
Line 9: Engine should validate the template status before updating it, same as
Line 10: being done in the GUI.
Line 11: The proposed fix is adding a validation for template status.
seems redundant to me.
Line 12: 
Line 13: Change-Id: If4e25d5e9badd3169b2b5a65c3a7e745adadf379
Line 14: Bug-Url: https://bugzilla.redhat.com/856515


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If4e25d5e9badd3169b2b5a65c3a7e745adadf379
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Ayal Baron <[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

Reply via email to