Liron Ar has posted comments on this change.

Change subject: core: Re-ordering validations at create snapshot command.
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 319:                 && validate(vmValidator.vmNotRunningStateless())
Line 320:                 && validate(vmValidator.vmNotIlegal())
Line 321:                 && validate(vmValidator.vmNotLocked());
Line 322: 
Line 323:         // Validate VM with disks.
please clarify here that it's relevant only so some of the vm disks and not all 
of them.
Line 324:         List<DiskImage> disksList = getDisksList();
Line 325:         if (result && disksList.size() > 0) {
Line 326:             MultipleStorageDomainsValidator sdValidator = 
createMultipleStorageDomainsValidator(disksList);
Line 327:             DiskImagesValidator diskImagesValidator = 
createDiskImageValidator(disksList);


Line 322: 
Line 323:         // Validate VM with disks.
Line 324:         List<DiskImage> disksList = getDisksList();
Line 325:         if (result && disksList.size() > 0) {
Line 326:             MultipleStorageDomainsValidator sdValidator = 
createMultipleStorageDomainsValidator(disksList);
I don't like that we perform here queries although we might never run the 
validations on the results (as sd validations run after the images validations) 
- if you want to change it...it will be better IMO, same goes for the 
vm/storage pool validation before.
Line 327:             DiskImagesValidator diskImagesValidator = 
createDiskImageValidator(disksList);
Line 328:             result =  
validate(diskImagesValidator.diskImagesNotLocked())
Line 329:                     && 
validate(diskImagesValidator.diskImagesNotIllegal())
Line 330:                     && 
validate(sdValidator.allDomainsExistAndActive())


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I58bfc73383ce5ca06bf670a8f63b5563da9caa02
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[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