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:
Gadi, Does this work correctly with plain REST calls?
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.
*** Bug 1101458 has been marked as a duplicate of this bug. ***
*** Bug 1101461 has been marked as a duplicate of this bug. ***
The fix for bug 1101531 required a rebase and regeneration of the Python SDK that fixes this bug as well.
The build has been released to QE.
Verified on av10 - able to pass correlation_id parameter to vm.preview_snapshot (commit_ and undo_ snapshot also tested and can receive correlation_id).
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