Allon Mureinik has posted comments on this change.

Change subject: core: Sync VM disks with new guid when importing a VM.
......................................................................


Patch Set 2: Looks good to me, but someone else must approve

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 99: 
Line 100:     private static VmStatic vmStaticForDefaultValues = new VmStatic();
Line 101:     private List<DiskImage> imageList;
Line 102: 
Line 103:     /*
should be a javadoc comment - start with /**, not /*
Line 104:      * Map which contains the disk id (new generated id if the disk 
is cloned) and the disk parameters from the export
Line 105:      * domain.
Line 106:      */
Line 107:     private final Map<Guid, DiskImage> newDiskGuidForDisk = new 
HashMap<>();


Line 103:     /*
Line 104:      * Map which contains the disk id (new generated id if the disk 
is cloned) and the disk parameters from the export
Line 105:      * domain.
Line 106:      */
Line 107:     private final Map<Guid, DiskImage> newDiskGuidForDisk = new 
HashMap<>();
IMHO, s/Guid/Id
Line 108:     private final List<String> macsAdded = new ArrayList<String>();
Line 109:     private final SnapshotsManager snapshotsManager = new 
SnapshotsManager();
Line 110: 
Line 111:     public ImportVmCommand(ImportVmParameters parameters) {


Line 831:         // Copy the disk so it will preserve the old disk id and 
image id.
Line 832:         newDiskGuidForDisk.put(newGuidForDisk, 
DiskImage.copyOf(disk));
Line 833:         disk.setId(newGuidForDisk);
Line 834:         disk.setImageId(Guid.newGuid());
Line 835:         for (int i = 0; i < diskList.size() - 1; i++) {
why not an enhanced for-loop?
Line 836:              diskList.get(i).setId(disk.getId());
Line 837:         }
Line 838:     }
Line 839: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If47f87b480d01dfd426a1aa24ddf48d75d3ff334
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to