Bug 1284587 - [template-version] Base template does not have <version> attribute
Summary: [template-version] Base template does not have <version> attribute
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.6.0.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-3.6.2
: 3.6.2
Assignee: jniederm
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-23 15:56 UTC by sefi litmanovich
Modified: 2016-02-18 11:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:04:56 UTC
oVirt Team: Virt
Embargoed:
michal.skrivanek: ovirt-3.6.z?
slitmano: planning_ack?
michal.skrivanek: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 49226 0 master MERGED restapi: Base templates also contains <version> tag Never
oVirt gerrit 49244 0 ovirt-engine-3.6 MERGED restapi: Base templates also contains <version> tag Never

Description sefi litmanovich 2015-11-23 15:56:14 UTC
Description of problem:

Say we have Template-A and we create another Template as a sub-template of Template-A. the new template inherits the name of the base template and can be given a sub-template name.
The new sub-template has a <version> attribute which holds <version_number>, <version_name> and a link to the base template.
On the other hand the Base template doesn't have a <version> attribute, whereas in DB it does have a template_version_number = 1 (the 1st subversion is 2 and so on..).
I think we should have a unity in the way we represent templates and therefore I think every template should have a <version> tag with <version_number>1</version_number> under it.

This isn't a crucial problem but it did in fact raise a problem in automation e.g. where a find request tried to check if a template is of version x , and got a NoneType when tried to derive the version attribute of the Base template.
while this is a small bug that can be handled inside our automation code,  I still expect a unity between the templates entities to prevent other small bugs like this.

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

How reproducible:
always.

Steps to Reproduce:
1. Create template.
2. Create a template as sub template of the previous template.
3. call GET to look at both template's attributes.

Actual results:

Base template has no <version> attribute

Expected results:

Base template has <version> attribute
Additional info:

Comment 1 Oved Ourfali 2015-11-24 06:41:25 UTC
Sefi - next time please fill in the whiteboard.

Comment 2 Yaniv Kaul 2015-11-24 08:08:08 UTC
Severity?

Comment 3 Red Hat Bugzilla Rules Engine 2015-11-24 15:58:48 UTC
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset.
Please set the correct milestone or add the z-stream flag.

Comment 4 Sandro Bonazzola 2015-12-23 13:42:03 UTC
oVirt 3.6.2 RC1 has been released for testing, moving to ON_QA

Comment 5 Lukas Svaty 2016-01-21 11:21:15 UTC
verified in rhevm-restapi-3.6.2.6-0.1.el6.noarch


Note You need to log in before you can comment on or make changes to this bug.