Maor Lipchuk has posted comments on this change.

Change subject: core: quota support for multiple storage images - DO NOT SUBMIT
......................................................................


Patch Set 10: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
Line 59: 
Two reasons:
 1. I think a map is simply more suitable to use here, since VM and VMTemplate 
both support API which returns list of images, so  to avoid getting into ugly 
synchronization between two lists, I think map will be more appropriate.
 2. I want to keep uniformity between the commands as much as I can.
Some commands do use list of images such as AddVmTemplateCommand, so there, I 
want to avoid the ugly synchronization between to lists so I must use a map.

Line 355:                 diskInfoDestinationMap.put(image.getId(),
This code should be refactoring, it should preserve the same logic as it was 
before, I didn't noticed it was changed.
The disks which are fetched are the template disks, as before.
 getDiskImageWithStorageId was created to reduce duplicate code.
I saw that in many places I had to use it, so I created this method to get 
cleaner code.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommand.java
Line 295:                 for (DiskImage image : 
getVmTemplate().getDiskMap().values()) {
Since storage id is not set in image.
I can't be sure that the same storage id retrieved from the parameter is the 
same in image,

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 86: 
Reused many times, simply for keeping DRY code.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3e4b7e28fb9dd3069e86bd8fdf41255398fd1e58
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to