Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1150071

Summary: API rsdl is missing the "snapshot id" flag in single snapshot preview - inconsistent with Rest API
Product: Red Hat Enterprise Virtualization Manager Reporter: Kevin Alon Goldblatt <kgoldbla>
Component: ovirt-engine-restapiAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: lkuchlan <lkuchlan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, bazulay, ecohen, gklein, iheim, kgoldbla, lsurette, ratamir, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0-vt8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1155656 1155659 (view as bug list) Environment:
Last Closed: 2015-02-16 19:09:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1155656, 1155659    
Attachments:
Description Flags
engine vdsm and server logs
none
image none

Description Kevin Alon Goldblatt 2014-10-07 11:51:21 UTC
Created attachment 944548 [details]
engine vdsm and server logs

Description of problem:
API rsdl is missing the "snapshot id" flag in single snapshot preview. This is inconsistent with Rest API which includes the flag

Version-Release number of selected component (if applicable):
rhevm-3.5.0-0.13.beta.el6ev.noarch
vdsm-4.16.5-2.el6ev.x86_64

How reproducible:
always

Steps to Reproduce:
1. Ran a query in Rest API for a single disk snapshot preview
2. The operation failed with a missing snapshot id
3. Need to add the "snapshot id" flag to the api rsdl 

Actual results:
snapshot id is missing from the single snapshot preview option in th api rdsl

Expected results:
Add "snapshot id" to the api rdsl

NB! Do not fix by removing the "snapshot id" from the REST API as all the automation tests include this flag

Additional info:
api rdsl output:  <<<< ===== snapshot id is missing here! =====
<body><type>Action</type><parameters_set><parameter required="true" type="xs:string"><name>action.snapshot.id</name></parameter><parameter required="false" type="xs:boolean"><name>action.restore_memory</name></parameter><parameter required="false" type="collection"><name>action.disks.disk</name><parameters_set><parameter required="false" type="xs:string"><name>disk.id</name></parameter><parameter required="false" type="xs:string"><name>disk.image_id</name></parameter></parameters_set></parameter></parameters_set></body>


REST API:
 <action>
   <snapshot id="{snapshot_id}"/>
   <restore_memory>true|false</restore_memory>
   <disks>
     <disk id="{disk_id}">
       <image_id>{image_id}</image_id>
       <snapshot id="{snapshot_id}"/>   <<< ======== THIS IS MISSING in api rsdl!!! ==========
     </disk>
   </disks>
 </action>

Comment 1 Juan Hernández 2014-10-07 12:03:58 UTC
I see the snapshot id parameter in the RSDL fragment available in the "additional info" section of the description of the bug:

<body>
  <type>Action</type>
    <parameters_set>
      <parameter required="true" type="xs:string">
        <name>action.snapshot.id</name>  <== Here it is.
      </parameter>
      <parameter required="false" type="xs:boolean">
        <name>action.restore_memory</name>
      </parameter>
      ...
    </parameter_set>
  </parameters_set>
</body>

Where is it missing?

Comment 2 Raz Tamir 2014-10-22 08:13:25 UTC
Hi Juan,
In the RSDL action body like you pasted, there is one place where the snapshot should be entered. but, when actually performing the action, the body is like Kevin pasted:
<action>
   <snapshot id="{snapshot_id}"/>
   <restore_memory>true|false</restore_memory>
   <disks>
     <disk id="{disk_id}">
       <image_id>{image_id}</image_id>
       <snapshot id="{snapshot_id}"/> <<< == THIS IS MISSING from rsdl
     </disk>
   </disks>
 </action>

You can see that it is requested to add the snapshot id inside the disk object.

This is the relevant part from the rsdl:
<parameter required="false" type="collection">
   <name>action.disks.disk</name>
   <parameters_set>
      <parameter required="false" type="xs:string">
         <name>disk.id</name>
      </parameter>
   <parameter required="false" type="xs:string">
      <name>disk.image_id</name>

only disk id and image id of that disk are requested in the rsdl (snapshot id isn't but still mandatory to perform this action)

Comment 3 Juan Hernández 2014-10-22 14:35:21 UTC
Understood, you are right.

Comment 4 Allon Mureinik 2014-11-06 09:51:46 UTC
This was included in vt8.

Comment 5 lkuchlan 2014-11-30 10:43:33 UTC
Created attachment 962880 [details]
image

Tested using RHEVM 3.5 vt11

Comment 6 Allon Mureinik 2015-02-16 19:09:51 UTC
RHEV-M 3.5.0 has been released, closing this bug.