Michael Kublin has posted comments on this change.

Change subject: core: add locks to VmTemplate commands (#761515)
......................................................................


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

(2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
Line 289:         if (getVmTemplate() == null) {
Line 290:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST);
Line 291:             return false;
Line 292:         }
Line 293: 
code duplication , AddVmCommand.canAddVm()
Fifth time that I wrote these.
Line 294:         if (!verifyVmTemplateStatusForUse(getVmTemplateId())) {
Line 295:             
addCanDoActionMessage(VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED.toString());
Line 296:             return false;
Line 297:         }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java
Line 70:             
addCanDoActionMessage(VdcBllMessages.VMT_CANNOT_REMOVE_BLANK_TEMPLATE);
Line 71:             return false;
Line 72:         }
Line 73: 
Line 74:         if 
(!VmTemplateHandler.isTemplateStatusIsNotLocked(getVmTemplateId())) {
Code duplication
Line 75:             
addCanDoActionMessage(VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED.toString());
Line 76:             return false;
Line 77:         }
Line 78: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d5b6518bbf19077ae5822b9359a6147c87d0f46
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Michael Kublin <[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