Liron Ar has posted comments on this change.

Change subject: core: deleting template with shared volumes should fail
......................................................................


Patch Set 2:

(3 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java
Line 157:         return checkNoDisksBasedOnTemplateDisks();
Line 158:     }
Line 159: 
Line 160:     private boolean checkNoDisksBasedOnTemplateDisks() {
Line 161:         List<String> disksInfo = null;
i prefer not to, in 99% of the cases it'll be fine.
Line 162:         for (DiskImage diskImage : imageTemplates) {
Line 163:             List<DiskImage> basedDisks = 
getDiskImageDAO().getAllSnapshotsForParent(diskImage.getImageId());
Line 164:             for (DiskImage basedDisk : basedDisks) {
Line 165:                 if (disksInfo == null) {


Line 164:             for (DiskImage basedDisk : basedDisks) {
Line 165:                 if (disksInfo == null) {
Line 166:                     disksInfo = new LinkedList<>();
Line 167:                 }
Line 168:                 disksInfo.add(String.format("Disk Alias: %s, Disk Id: 
%s ", basedDisk.getDiskAlias(), basedDisk.getId()));
Done
Line 169:             }
Line 170:         }
Line 171: 
Line 172:         if (disksInfo != null) {


Line 168:                 disksInfo.add(String.format("Disk Alias: %s, Disk Id: 
%s ", basedDisk.getDiskAlias(), basedDisk.getId()));
Line 169:             }
Line 170:         }
Line 171: 
Line 172:         if (disksInfo != null) {
commented.
Line 173:             return 
failCanDoAction(VdcBllMessages.VMT_CANNOT_REMOVE_DETECTED_DERIVED_DISKS,
Line 174:                     String.format("$disksInfo %s",
Line 175:                             String.format(StringUtils.join(disksInfo, 
"%n"))));
Line 176:         }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If781238d7be4768b1086645c64b4ccf807dc6108
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to