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

Bug 1155659

Summary: [REGENERATE JAVA SDK] API rsdl is missing the "snapshot id" flag in single snapshot preview - inconsistent with Rest API
Product: Red Hat Enterprise Virtualization Manager Reporter: Juan Hernández <juan.hernandez>
Component: ovirt-engine-sdk-javaAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: aberezin, acanan, bazulay, ecohen, gklein, iheim, kgoldbla, lsurette, rbalakri, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: rhevm-sdk-java-3.5.0.5-4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1150071 Environment:
Last Closed: 2015-02-11 18:11:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1150071    
Bug Blocks:    
Attachments:
Description Flags
Proposed patch to fix the bug none

Description Juan Hernández 2014-10-22 14:44:41 UTC
+++ This bug was initially created as a clone of Bug #1150071 +++

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>

--- Additional comment from Juan Hernández on 2014-10-07 08:03:58 EDT ---

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?

--- Additional comment from  on 2014-10-22 04:13:25 EDT ---

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)

--- Additional comment from Juan Hernández on 2014-10-22 10:35:21 EDT ---

Understood, you are right.

Comment 1 Juan Hernández 2014-11-04 18:28:37 UTC
Created attachment 953763 [details]
Proposed patch to fix the bug

Comment 5 errata-xmlrpc 2015-02-11 18:11:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0184.html