Omer Frenkel has posted comments on this change.
Change subject: core,frontend: show template name also for cloned VMs
......................................................................
Patch Set 5:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
Line 733: vmStatic.setUserDefinedProperties(userDefinedProperties);
Line 734: }
Line 735:
Line 736: vmStatic.setOriginalTemplateGuid(vmStatic.getVmtGuid());
Line 737: VmTemplate template =
getVmTemplateDAO().get(vmStatic.getVmtGuid());
actually anyway you can use getVmTemplate() here
Line 738: vmStatic.setOriginalTemplateName(template.getName());
Line 739: getVmStaticDao().save(vmStatic);
Line 740: getCompensationContext().snapshotNewEntity(vmStatic);
Line 741: }
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 963:
getVm().getStaticData().setVdsGroupId(getParameters().getVdsGroupId());
Line 964:
getVm().getStaticData().setMinAllocatedMem(computeMinAllocatedMem());
Line 965:
getVm().getStaticData().setQuotaId(getParameters().getQuotaId());
Line 966:
Line 967: VmTemplate originalTemplate =
DbFacade.getInstance().getVmTemplateDao().get(getVm().getOriginalTemplateGuid());
not sure it worth the extra code, this is very little optimization, also, for
empty guid, not sure we have the blank template name, i dont want to hard code
it
Line 968: if (originalTemplate != null) {
Line 969: // in case the original template name has been changed in
the meantime
Line 970:
getVm().getStaticData().setOriginalTemplateName(originalTemplate.getName());
Line 971: }
--
To view, visit http://gerrit.ovirt.org/21047
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieea4ad7c1ed845d3ff57aaafc19f0830ab72b2d1
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[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