Maor Lipchuk has posted comments on this change.

Change subject: core: AddVmTemplate - check perms on target SDs
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
Line 459:                     : getVdsGroup().getStoragePoolId().getValue();
Line 460: 
Line 461:             if (getVm() != null && !getVm().getDiskList().isEmpty()) {
Line 462:                 for (DiskImage disk : 
getParameters().getDiskInfoDestinationMap().values()) {
Line 463:                     if (disk.getStorageIds() != null && 
!disk.getStorageIds().isEmpty()) {
In which scenario disk.getStorageIds() can be null or empty?
Disk without storage is only Lun disk and here we are checking only diskImage

IMO those conditions can be removed.
Line 464:                         
addStoragePermissionByQuotaMode(permissionCheckSubject,
Line 465:                                 GuidUtils.getGuidValue(storagePoolId),
Line 466:                                 
GuidUtils.getGuidValue(disk.getStorageIds().get(0)));
Line 467:                     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b813f457ad5dc9e2cb2b26f04caf79fd6e227a0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to