Bug 1101405

Summary: [python-sdk] Preview snapshot action does not support passing correlation_id parameter
Product: Red Hat Enterprise Virtualization Manager Reporter: Gadi Ickowicz <gickowic>
Component: ovirt-engine-sdkAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0CC: amureini, gklein, iheim, juan.hernandez, nlevinki, oourfali, oramraz, pstehlik, rbalakri, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: rhevm-sdk-python-3.4.1.1-1.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 21:13:46 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:    
Bug Blocks: 1142923, 1156165    

Description Gadi Ickowicz 2014-05-27 06:47:15 UTC
Description of problem:
vm.preview_snapshot() method does not support passing correlation_id parameter like other actions in sdk:

>>> vm.preview_snapshot(params.Action(snapshot=snap), correlation_id='preview_test')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: preview_snapshot() got an unexpected keyword argument 'correlation_id'
>>> vm.preview_snapshot(params.Action(snapshot=snap))
<ovirtsdk.xml.params.Action object at 0x26f5850>



Version-Release number of selected component (if applicable):
rhevm-sdk-python-3.4.1.0-2.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Try to pass correlation_id parameter to preview_snapshot function in sdk

Actual results:
Fails with TypeError: preview_snapshot() got an unexpected keyword argument


Expected results:
python-sdk should allow user to pass correlation_id parameter for all actions

Additional info:

Comment 1 Allon Mureinik 2014-05-29 08:41:18 UTC
Gadi,

Does this work correctly with plain REST calls?

Comment 2 Juan Hernández 2014-06-03 11:21:16 UTC
The reason for this is that the RSDL metadata for the preview_snapshot, commit_snapshot, undo_snapshot and clone operations of VMs contain an extra /api segment in the specification of the URL. This confuses the RSDL generator, and as a result the generated RSDL doesn't contain the correct data.

The proposed patch removes the extra /api URL segment. Once that is fixed in the engine the SDKs will need to be regenerated.

Comment 3 Juan Hernández 2014-06-03 11:33:47 UTC
*** Bug 1101458 has been marked as a duplicate of this bug. ***

Comment 4 Juan Hernández 2014-06-03 11:34:41 UTC
*** Bug 1101461 has been marked as a duplicate of this bug. ***

Comment 5 Juan Hernández 2014-06-24 16:18:49 UTC
The fix for bug 1101531 required a rebase and regeneration of the Python SDK that fixes this bug as well.

Comment 6 Juan Hernández 2014-06-26 09:06:35 UTC
The build has been released to QE.

Comment 7 Gadi Ickowicz 2014-06-26 11:51:06 UTC
Verified on av10 - able to pass correlation_id parameter to vm.preview_snapshot
(commit_ and undo_ snapshot also tested and can receive correlation_id).

Comment 11 errata-xmlrpc 2015-02-11 21:13:46 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-0183.html