Maor Lipchuk has posted comments on this change.
Change subject: core: export vm/create template shouldn't include ILLEGAL disks
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 668: if (disk.getDiskStorageType() == DiskStorageType.IMAGE &&
Line 669: (!allowOnlyNotShareableDisks ||
!disk.isShareable()) &&
Line 670: (!allowOnlySnapableDisks ||
disk.isAllowSnapshot())) {
Line 671: DiskImage diskImage = (DiskImage) disk;
Line 672: if (allowIllegalDisks || diskImage.getImageStatus()
!= ImageStatus.ILLEGAL){
Suggestion: I'm not a fan of hierarchy conditions, perhaps you can place the
condition to the above condition as so:
if (disk.getDiskStorageType() == DiskStorageType.IMAGE &&
.... &&
(allowIllegalDisks || ((DiskImage) disk).getImageStatus() !=
ImageStatus.ILLEGAL) {
diskImages.add((DiskImage) disk)
}
Or more better re-factor all those conditions to methods.
What do you think?
Line 673: diskImages.add(diskImage);
Line 674: }
Line 675: }
Line 676: }
--
To view, visit http://gerrit.ovirt.org/13203
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6e608c0c87c6e3a8d275fd74658b888cde6c8694
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches