Allon Mureinik has posted comments on this change.
Change subject: core: wip: handle failed import of template
......................................................................
Patch Set 2: (2 inline comments)
1. see inline.
2. what kind of CDA validation do you want there?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
Line 134: if (!retVal) {
Line 135: break;
Line 136: } else {
Line 137:
image.setStoragePoolId(getParameters().getStoragePoolId());
Line 138: image.setStorageIds(new
ArrayList<Guid>(Arrays.asList(storageDomain.getId())));
Don't understand what this change does - please explain?
Line 139: imageMap.put(image.getImageId(), image);
Line 140: }
Line 141: }
Line 142: getVmTemplate().setDiskImageMap(imageMap);
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java
Line 190: @Override
Line 191: protected void revertTasks() {
Line 192: // Revert should be performed only for AddVmFromSnapshot at
this point.
Line 193: if (getParameters().getParentCommand() ==
VdcActionType.AddVmFromSnapshot || getParameters().getParentCommand() ==
VdcActionType.ImportVm
Line 194: || getParameters().getParentCommand() ==
VdcActionType.ImportVmTemplate) {
I really, really hate this if-else.
Any chance of making it a bit more elegant?
Line 195: Guid destImageId =
getParameters().getDestinationImageId();
Line 196: RemoveImageParameters removeImageParams =
Line 197: new RemoveImageParameters(destImageId);
Line 198: if (getParameters().getParentCommand() ==
VdcActionType.AddVmFromSnapshot) {
--
To view, visit http://gerrit.ovirt.org/14839
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If90414b6c50d922b510a10e20e0774bdbec9c05b
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches