Bug 1199811 - [REHV] SDK and REST ignore template's disk attributes
Summary: [REHV] SDK and REST ignore template's disk attributes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Amit Aviram
QA Contact: Ori Gofen
URL:
Whiteboard:
Depends On: 1110798 1222283
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-08 15:18 UTC by Allon Mureinik
Modified: 2016-03-10 12:06 UTC (History)
13 users (show)

Fixed In Version: ovirt-engine-3.6.0_qa1
Doc Type: Bug Fix
Doc Text:
Cause: When adding a template via REST API and providing its new disk's alias, the action succeeded but the disk's alias was not changed. Consequence: The user can provide an alias but cannot know that it will not actually be changed. Fix: New template's disk alias is changeable now. Result: The fields which are specified in the new template request's signature are available for usage. among them is the disk's alias.
Clone Of: 1110798
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 37808 0 None None None Never

Description Allon Mureinik 2015-03-08 15:18:23 UTC
+++ This bug was initially created as a clone of Bug #1110798 +++

Description of problem:
When trying to create a template from SDK or REST api, there is an option to select the alias of the template's disk.

In REST (for example):
<template>
<name>temp_from_1</name>
<vm id='4c5d042e-bd34-4280-a0eb-2985863ffb15'>
    <disks>
        <disk id='2b997211-ad7a-48ba-b2f0-cf3264ea4447'>
           <alias>new_name</alias>
         </disk>
    </disks>
</vm>
</template>

The new created template id is: 15c4415c-205d-474d-a626-6b7c29caac94

The response: in /api/templates/15c4415c-205d-474d-a626-6b7c29caac94/disks


<disk href= "/api/templates/15c4415c-205d-474d-a626-6b7c29caac94/disks/50bfde29-379b-4cdf-b629-e2538f4464c1" id="50bfde29-379b-4cdf-b629-e2538f4464c1">
<actions>
<link href= "/api/templates/15c4415c-205d-474d-a626-6b7c29caac94/disks/50bfde29-379b-4cdf-b629-e2538f4464c1/export" rel="export"/>
<link href= "/api/templates/15c4415c-205d-474d-a626-6b7c29caac94/disks/50bfde29-379b-4cdf-b629-e2538f4464c1/copy" rel="copy"/>
</actions>
<name>vm_99_Disk1</name>   ********* NOT AS EXPECTED *********
<template href= "/api/templates/15c4415c-205d-474d-a626-6b7c29caac94" id="15c4415c-205d-474d-a626-6b7c29caac94"/>
<alias>vm_99_Disk1</alias>
<image_id>eb6bfa68-bfbe-48ba-aa62-3377105383b6</image_id>
<storage_domains>
<storage_domain id="5b5b33a0-ca1f-476f-82f0-ccb06437283b"/>
</storage_domains>
<provisioned_size>5368709120</provisioned_size>
<actual_size>1073741824</actual_size>
<status>
<state>ok</state>
</status>
</disk>


Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140605145557.git3ddd2de.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. POST in /api/templates/ :
1.1  
<template>
<name>temp_from_1</name>
<vm id={vm_id}>
    <disks>
        <disk id={disk_id}>
           <alias>new_name</alias>
         </disk>
    </disks>
</vm>
</template>

2. Check the response body
3.

Actual results:
In the response body under the vm_id/disks, check the newly created disk's alias

Expected results:
the disk's alias should be like the alias that sent in the request body

Additional info:

--- Additional comment from Amit Aviram on 2015-02-16 11:05:04 IST ---

This is actually a wider bug than what is described- Any field which is specified in the REST XML regarding the new template's disks is ignored.

--- Additional comment from Amit Aviram on 2015-03-08 16:34:44 IST ---

The patch added now makes the REST request for a new template to be correlated with the rsdl_metadata file, which specifies what can be posted and what not.

Disk's alias is now specified there and can be changed via REST.
===============================================================================
This is a clone for RHEV so that REHV's docs can pick up the doctext too.

Comment 1 Ori Gofen 2015-07-01 12:52:44 UTC
Verified on ovirt 3.6

Comment 3 Allon Mureinik 2016-03-10 10:48:11 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 4 Allon Mureinik 2016-03-10 10:50:14 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 5 Allon Mureinik 2016-03-10 12:06:50 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE


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