Bug 1418672

Summary: [REST API] Template entities in API do not include placement policy attribute
Product: [oVirt] ovirt-engine Reporter: sefi litmanovich <slitmano>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, dfediuck, michal.skrivanek
Target Milestone: ---   
Target Release: ---   
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-07-26 08:40:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description sefi litmanovich 2017-02-02 13:37:11 UTC
Description of problem:
Currently the template entity in REST API is not consistent with the template menu in UI, as in UI one can define a specific host and an affinity for the template (similar to these configurations for vm), but on API, as opposed to vm entity, the template entity does not include the placement_policy attribute and it's sub-attributes that correspond to these options in UI.
This requires one of two possible solutions:
1. Remove/Blank out these configurations on the template menu in UI if we decide they should be only configurable on vm level.
2. Add/show the placement_policy attribute and it's sub attributes in REST API. 

Version-Release number of selected component (if applicable):
rhevm-4.1.0.3-0.1.el7.noarch and down

How reproducible:
always

Steps to Reproduce:
1. Set a specific host and set no migration for a template via UI->template menu -> Host sub tab
2. Call get on that template via REST API

Actual results:
The template xml doesn't include the information you just configured in UI (as explained above)

Expected results:
The template xml should reflect all the template's configurations including those added in step 1.

e.g.

<placement_policy>
<affinity>pinned</affinity>
<hosts>
<host id="{host_id}"/>
</hosts>
</placement_policy>

Additional info:

Comment 1 Doron Fediuck 2017-07-26 08:40:38 UTC
We won't be perusing this issue any more. If someone needs it, patches are welcomed.