Bug 1397118

Summary: Vm inherits display type from template instead of instance type if created via API
Product: [oVirt] ovirt-engine Reporter: sefi litmanovich <slitmano>
Component: RestAPIAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED WONTFIX QA Contact: Israel Pinto <ipinto>
Severity: low Docs Contact:
Priority: low    
Version: 4.0.6CC: bugs, ipinto, mavital, michal.skrivanek, tjelinek
Target Milestone: ---Keywords: Reopened
Target Release: ---Flags: sbonazzo: ovirt-4.2-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-21 10:26:37 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:
Attachments:
Description Flags
engine log none

Description sefi litmanovich 2016-11-21 16:26:19 UTC
Created attachment 1222438 [details]
engine log

Description of problem:
Display type is considered a mandatory field of instance types, so when creating a vm from an instance type and a template, the vm should inherit the display type from the instance type.
When creating a vm via UI this is working as expected.
When creating the vm via API the vm will inherit the template's display type e.g.:

<vm>
    <name>instance_type_test_vm</name>
    <cluster id="{cluster_id}"/>
    <instance_type id="{instance_type_id}"/>
    <template id="00000000-0000-0000-0000-000000000000"/>
</vm>



Version-Release number of selected component (if applicable):
rhevm-4.0.6-0.1.el7ev.noarch

How reproducible:
always

Steps to Reproduce:
1. Set an instance type with display type vnc.
2. Create a template with display type spice
3. Create a vm in UI with the template and the instance type.
4. Create another vm via API with the same template and instance type

Actual results:
The first vm created in UI will have display type = vnc.
The 2nd vm created in API will have display type = spice.

Expected results:
Both vms should have display type set to vnc.

Additional info:

Comment 1 Tomas Jelinek 2017-07-18 08:51:53 UTC
Unfortunately I have to close this due to capacity. If it is an important item for you, please feel free to reopen.