Bug 1655452

Summary: Instance type is allowed to created with wrong console settings
Product: [oVirt] ovirt-engine Reporter: Liran Rotenberg <lrotenbe>
Component: BLL.VirtAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: low    
Version: 4.3.0CC: bugs, mavital, rbarry
Target Milestone: ovirt-4.3.0Keywords: Automation
Target Release: ---Flags: rule-engine: ovirt-4.3+
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-04 12:48:46 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:

Description Liran Rotenberg 2018-12-03 08:14:30 UTC
Description of problem:
It is allowed to create a instance type with graphic protocol: spice and video type cirrus. 
Changing the video type and checking the instance type console again shows no change.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a new instance type for example in rest api:
POST https://<engine-fqdn>/ovirt-engine/api/instancetypes?create
    <description>I am a test</description>
        <policy id="00000000-0000-0000-0000-000000000000"/>
2. Check the console of the created instance type.
3. Edit the video type to QXL.
4. Check the instance type console again.

Actual results:
The instance type is created with spice, cirrus. Which is not supported.
Editing the video type doesn't actually change the instance type.

Expected results:
Instance type created with spice will be set with QXL. Editing the instance type will save the change of the video type.
Further more, if instance type is created with more than 1 monitor, allow only spice+qxl.

Additional info:
If a VM is created from a template with the instance type from step 1 using REST API. The VM creation will fail:
ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-26) [] Operation Failed: [User is not authorized to perform this action., User is not authorized to perform this action., Cannot add VM. Illegal number of monitors is provided, max allowed number of monitors is 1 for VNC and the max number in the ValidNumOfMonitors configuration variable for SPICE.]

Comment 1 Michal Skrivanek 2018-12-04 12:48:46 UTC
we're removing cirrus in bug 1656007 completely, so hopefully this behavior is going to get fixed too.

*** This bug has been marked as a duplicate of bug 1656007 ***