Liron Aravot has posted comments on this change.
Change subject: core: Add validation for locked template
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
Line 35:
Line 36: @Override
Line 37: protected boolean canDoAction() {
Line 38: boolean returnValue = false;
Line 39: mOldTemplate =
DbFacade.getInstance().getVmTemplateDao().get(getVmTemplate().getId());
1. this check should be inside the if at line 45 , otherwise can cause to NPE
2. i guess that lock need to be added
Line 40: if (mOldTemplate.getstatus() == VmTemplateStatus.Locked) {
Line 41:
addCanDoActionMessage(VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED);
Line 42: return false;
Line 43: }
--
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: 1
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: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches