Maor Lipchuk has posted comments on this change.
Change subject: core: Update managed device map when importing a cloned VM.
......................................................................
Patch Set 6:
(3 comments)
There are already unit tests for import VM and Template.
The patch does not introduce a new validation, but simply updates a map in the
VM, if you think it is necessary to add a test for it, I will do so.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 832: }
Line 833: }
Line 834:
Line 835: /**
Line 836: * Generates a new <code>GUID</code> for disk and its volumes and
updates all the related attributes.
done
Line 837: *
Line 838: * @param diskList
Line 839: * - All the disk's volumes
Line 840: * @param disk
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java
Line 371: return true;
Line 372: }
Line 373:
Line 374: /**
Line 375: * Cloning a new disk and all its volumes with a new generated
id. <BR/> The disk will have the same parameters as <code>disk</code>.<BR/> Also
I don't see what is the difference, but I don't mind changing it.
done
Line 376: * adding the disk to <code>newDiskGuidForDisk</code> map, so we
will be able to link between the new cloned disk
Line 377: * and the old disk id.
Line 378: *
Line 379: * @param diskImagesList
Line 413: protected Guid generateNewDiskId(DiskImage disk) {
Line 414: Guid newGuidForDisk = Guid.newGuid();
Line 415:
Line 416: // Copy the disk so it will preserve the old disk id and
image id.
Line 417: newDiskIdForDisk.put(newGuidForDisk, DiskImage.copyOf(disk));
It is a code which was copied for ImportVmCommand.
I don't think this is an issue since for now this map only used for mapping old
guid with new guid.
Line 418: disk.setId(newGuidForDisk);
Line 419: disk.setImageId(Guid.newGuid());
Line 420: return newGuidForDisk;
Line 421: }
--
To view, visit http://gerrit.ovirt.org/19954
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I65a99cc0783f670b9288cc9a066cda4d253492a6
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[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