Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1101405 - [python-sdk] Preview snapshot action does not support passing correlation_id parameter
Summary: [python-sdk] Preview snapshot action does not support passing correlation_id ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: nlevinki
URL:
Whiteboard: infra
: 1101458 1101461 (view as bug list)
Depends On:
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-05-27 06:47 UTC by Gadi Ickowicz
Modified: 2016-02-10 19:32 UTC (History)
12 users (show)

Fixed In Version: rhevm-sdk-python-3.4.1.1-1.el6ev
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-11 21:13:46 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0183 normal SHIPPED_LIVE rhevm-sdk-python bug fix and enhancement update 2015-02-12 01:36:21 UTC
oVirt gerrit 28321 master MERGED restapi: Remove /api from snapshot metadata URL Never
oVirt gerrit 28345 ovirt-engine-3.4 MERGED restapi: Remove /api from snapshot metadata URL Never

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


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