Tomas Jelinek has posted comments on this change.

Change subject: core,frontend: show template name also for cloned VMs
......................................................................


Patch Set 2:

(3 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 69:         if (isVmExist()) {
Line 70:             setCustomDefinedProperties(parameters.getVmStaticData());
Line 71:             setCustomDefinedProperties(getVm().getStaticData());
Line 72: 
Line 73:             // not editable
well, this fields are not meant to be edited so I did not want to force the 
user of this service to keep sending me the same data and just check if he did 
not forget to.

But if you want, I can remove this and add this logic to FE and REST. But here 
it is more appropriate I would say... What do you think?
Line 74:             
getParameters().getVm().setOriginalTemplateName(getVm().getOriginalTemplateName());
Line 75:             
getParameters().getVm().setOriginalTemplateGuid(getVm().getOriginalTemplateGuid());
Line 76:         }
Line 77:     }


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java
Line 251:                         .addValue("vds_id", vdsId));
Line 252:     }
Line 253: 
Line 254:     @Override
Line 255:     public void updateOriginalTemplateName(Guid originalTemplateId, 
String originalTemplateName) {
you are right, I will
Line 256:         
getCallsHandler().executeModification("UpdateOriginalTemplateName",
Line 257:                 getCustomMapSqlParameterSource()
Line 258:                         .addValue("original_template_id", 
originalTemplateId)
Line 259:                         .addValue("original_template_name", 
originalTemplateName)


....................................................
File 
packaging/dbscripts/upgrade/03_04_0100_add_original_template_to_vm_static.sql
Line 1: select fn_db_add_column('vm_static', 'original_template_id', 'UUID 
default null');
I also wanted to use the vmt_guid but I would say it is not possible since the 
vmt_guid expects that the template to which it points to exists (e.g. you can 
not delete it). This is useful and should be preserved.

On the other hand the original_template_id is there to be possible to adjust 
the template name if the template name changes (even in strange flows like 
export, delete it here, rename it there, import here again).


-- 
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: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Eli Mesika <[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

Reply via email to