Arik Hadas has uploaded a new change for review. Change subject: core: change name of imported vm not as a clone ......................................................................
core: change name of imported vm not as a clone It was not possible to change the name of a VM that is being imported not as a clone. The import command is now changed to support that. Change-Id: I1e315e8bdcb1dd5e0c650878602bfc947a9fa7ae Signed-off-by: Arik Hadas <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/14/40314/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java index 0791732..a62a640 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java @@ -311,7 +311,7 @@ // At this point we should work with the VM that was read from // the OVF because the VM from the parameters may lack images - setVm(vm); + setVmFromExportDomain(vm); // Iterate over all the VM images (active image and snapshots) for (DiskImage image : getImages()) { @@ -359,6 +359,14 @@ return true; } + private void setVmFromExportDomain(VM vm) { + // preserve the given name + if (getVmName() != null) { + vm.setName(getVmName()); + } + setVm(vm); + } + protected DiskImage getActiveVolumeDisk(List<DiskImage> diskList) { return diskList.get(diskList.size() - 1); } -- To view, visit https://gerrit.ovirt.org/40314 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e315e8bdcb1dd5e0c650878602bfc947a9fa7ae Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
