Daniel Erez has posted comments on this change. Change subject: webadmin: MoveOrCopyDiskModel: postInitStorageDomains refactoring. ......................................................................
Patch Set 4: Code-Review+2 (3 comments) Looks good. Please just fix formatting issues.. http://gerrit.ovirt.org/#/c/36555/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/MoveOrCopyDiskModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/MoveOrCopyDiskModel.java: Line 226: if (isDiskBasedOnTemplate) { Line 227: templateDisk = getTemplateDiskByVmDisk(diskModel); Line 228: } Line 229: Line 230: ArrayList<StorageDomain> destinationDomains = new ArrayList<>(); formatter Line 231: for (StorageDomain sd : activeStorageDomains ) { Line 232: // Storage domain destination should not be a domain which the disk is attached to. Line 233: if (sourceActiveStorageDomains.contains(sd)) { Line 234: continue; Line 240: continue; Line 241: } Line 242: Line 243: boolean hasSameSubType = sd.getStorageType().getStorageSubtype() == diskImage.getStorageTypes().get(0).getStorageSubtype(); Line 244: if (shouldFilterBySourceType && !hasSameSubType ) { formatter Line 245: continue; Line 246: } Line 247: Line 248: if (!isDomainValidForDiskTemplate(templateDisk, sd)) { Line 260: return destinationDomains; Line 261: } Line 262: Line 263: private boolean isDomainValidForDiskTemplate(DiskModel templateDisk, StorageDomain sd) { Line 264: if ( templateDisk != null ) { formatter Line 265: return ((DiskImage) templateDisk.getDisk()).getStorageIds().contains(sd.getId()); Line 266: } Line 267: return true; Line 268: } -- To view, visit http://gerrit.ovirt.org/36555 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7538a341c3a7059b0a6ee369ca1a9b33648df456 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: [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
