Bug 1333045

Summary: original template field is not exposed to REST API
Product: [oVirt] ovirt-engine Reporter: enax
Component: RestAPIAssignee: Marek Libra <mlibra>
Status: CLOSED CURRENTRELEASE QA Contact: sefi litmanovich <slitmano>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.5CC: bgraveno, bugs, mlibra, tjelinek
Target Milestone: ovirt-4.1.0-alphaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+
Target Release: 4.1.0.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
A new 'original_template' property has been introduced for the 'vm' REST API resource. This enables the user to get information about the template the virtual machine was based on before cloning.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:35:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description enax 2016-05-04 14:49:59 UTC
Description of problem:

Down there is the last email from Tomas Jelinek, the full thread can be found here: http://lists.ovirt.org/pipermail/users/2016-May/039622.html

the thing is that:
- if you create a VM from a template using the "clone" provisioning the VM is detached from the VM and is considered to be based on Blank
- this is why the VM dialog shows blank and the REST returns blank
- there has been a feature implemented (in 3.5 IIRC) which introduced the concept of "original template" - so we remember also what template it was cloned from (both name and ID)
- it seems this particular field is not exposed to REST API, only to UI

Comment 1 Sandro Bonazzola 2016-12-12 13:54:56 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 2 sefi litmanovich 2016-12-19 08:38:13 UTC
Verified with ovirt-engine-4.1.0-0.2.master.20161218144454.gitbaa2853.el7.centos.noarch.

original_template attribute in vm API links to the original template where the original vm was created from.
In a vm created from template the link is the same as template attribute.
In cloned vms (tried clone from vm/template/snapshot) template attribute links to Blank template and original_template to the template of the source.