Sergey Gotliv has posted comments on this change. Change subject: engine: Ties more consitently between vm disk device and disk entities. ......................................................................
Patch Set 2: (5 comments) .................................................... Commit Message Line 3: AuthorDate: 2013-08-08 22:54:26 +0300 Line 4: Commit: Sergey Gotliv <sgot...@redhat.com> Line 5: CommitDate: 2013-08-09 01:39:39 +0300 Line 6: Line 7: engine: Ties more consitently between vm disk device and disk entities. Done Line 8: Line 9: VmDevice is the model entity on the Engine that ties between VM and Line 10: the disk attached to this VM. Disk is not the only entity which tied to Line 11: VM by VmDevice, but the only to be affected by this patch. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmAndCloneImageCommand.java Line 169: * @param result Line 170: * result of execution of child command Line 171: */ Line 172: private void handleCopyResult(DiskImage srcDiskImage, DiskImage copiedDiskImage, Line 173: VdcActionParametersBase parameters, VdcReturnValueBase result) { We don't need it. I'll remove it. Line 174: // If a copy cannot be made, abort Line 175: if (!result.getSucceeded()) { Line 176: throw new VdcBLLException(VdcBllErrors.VolumeCreationError); Line 177: } else { .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java Line 86: * A list of the new disk images which were saved for the VM. Line 87: */ Line 88: protected List<DiskImage> newDiskImages = new ArrayList<DiskImage>(); Line 89: Line 90: protected Map<Guid, Guid> srcDiskToTargetDiskMapping = new HashMap<>(); Done Line 91: Line 92: public AddVmCommand(T parameters) { Line 93: super(parameters); Line 94: // if we came from EndAction the VmId is not null Line 738: } else { Line 739: getTaskIdList().addAll(result.getInternalVdsmTaskIdList()); Line 740: DiskImage newImage = (DiskImage) result.getActionReturnValue(); Line 741: srcDiskToTargetDiskMapping.put(dit.getId(), newImage.getId()); Line 742: newDiskImages.add(newImage); We don't need a List of new images, just their ids. I wanted to avoid refactoring here, but you asked... So I did it. Line 743: } Line 744: } Line 745: } Line 746: return true; .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java Line 166: * Line 167: * @param oldVm Line 168: * @param newVmBase Line 169: * @param compatibilityVersion compatibility version Line 170: * @param isSoundDeviceEnabled device enabled - if null, keep old state Done Line 171: */ Line 172: public static void updateAudioDevice(VmBase oldVm, VmBase newVmBase, Version compatibilityVersion, Boolean isSoundDeviceEnabled) { Line 173: boolean removeDevice = false; Line 174: boolean createDevice = false; -- To view, visit http://gerrit.ovirt.org/17854 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bf284ea4e05f03fc0a7e94a1ec901aacbdc1ab1 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Haim Ateya <hat...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches