Michael Kublin has posted comments on this change.

Change subject: core, rest: Refactor 2 - Disk Image
......................................................................


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

(9 inline comments)

Because of luck of response for previous comments, -1

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
Line 121:         if (disk != null && disk.getimage_group_id() != null && 
disk.getactive()) {
Change query, make query that retrieve only ids, or look where a query is used 
and make a mew query retriveFiskByIdAndVmId(), it used only at 3 places

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmAndCloneImageCommand.java
Line 60:         Guid vmGuid = vm != null ? vm.getId() : getVmId();
you created a disk image two lines before and u passed a vmId and now you are 
trying to retrieve it from DB ....

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromSnapshotCommand.java
Line 152:                 super.cloneDiskImage(storageDomainId, 
newImageGroupId, newImageGuid, srcDiskImage);
I supposed, we don't need here a id of new vm, please explain why u removed it?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/BaseImagesCommand.java
Line 60:             } else {
It is wrong sometimes container contains templateId, as at AddImageFromScratch
a fix should be done better

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
Line 288:         if (image != null) {
WTF?, the id of vm should be calculated and not retrive from the params,
BUG (By the way I already explained it to you why)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
Line 51:             }
else If

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java
Line 169:      */
I suppose it is needed a two different vms for test?

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommandTest.java
Line 47: 
These is example like during introducing a bug, also appropriate unit test is 
created

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ImagesContainterParametersBase.java
Line 13:     private Guid vmContainerId = Guid.Empty;
why u need these? U already has containerId

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia600ea9fea52717065da3c9a309ad364a27eb88f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to