Bug 1284587 - [template-version] Base template does not have <version> attribute
[template-version] Base template does not have <version> attribute
Product: ovirt-engine
Classification: oVirt
Component: RestAPI (Show other bugs)
Unspecified Unspecified
medium Severity medium (vote)
: ovirt-3.6.2
: 3.6.2
Assigned To: jniederm
Lukas Svaty
Depends On:
  Show dependency treegraph
Reported: 2015-11-23 10:56 EST by sefi litmanovich
Modified: 2016-02-18 06:04 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-18 06:04:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
michal.skrivanek: ovirt‑3.6.z?
slitmano: planning_ack?
michal.skrivanek: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 49226 master MERGED restapi: Base templates also contains <version> tag Never
oVirt gerrit 49244 ovirt-engine-3.6 MERGED restapi: Base templates also contains <version> tag Never

  None (edit)
Description sefi litmanovich 2015-11-23 10:56:14 EST
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):

How reproducible:

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 01:41:25 EST
Sefi - next time please fill in the whiteboard.
Comment 2 Yaniv Kaul 2015-11-24 03:08:08 EST
Comment 3 Red Hat Bugzilla Rules Engine 2015-11-24 10:58:48 EST
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 08:42:03 EST
oVirt 3.6.2 RC1 has been released for testing, moving to ON_QA
Comment 5 Lukas Svaty 2016-01-21 06:21:15 EST
verified in rhevm-restapi-

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