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

Bug 1206230

Summary: [REGENERATE JAVA SDK] No correlation-id parameter under methods of AffinityGroup
Product: Red Hat Enterprise Virtualization Manager Reporter: Juan Hernández <juan.hernandez>
Component: ovirt-engine-sdk-javaAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Gonza <grafuls>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: alukiano, bazulay, gklein, lsurette, pstehlik, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-3.6.0-rc   
Target Release: 3.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-sdk-java-3.6.0.0-0.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1206130 Environment:
Last Closed: 2016-04-20 01:30:09 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: 1206130, 1245066    
Bug Blocks:    

Description Juan Hernández 2015-03-26 15:26:57 UTC
+++ This bug was initially created as a clone of Bug #1206130 +++

Description of problem:
When I try to add new affinity with python SDK and with parameter correlation_id, method fail:
Traceback (most recent call last):
  File "/home/alukiano/PycharmProjects/ART/art/tests/rhevm/unittests/local_test/python_sdk.py", line 18, in <module>
    test_cluster.affinitygroups.add(affinity_group, correlation_id='111111222')
TypeError: add() got an unexpected keyword argument 'correlation_id'

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

How reproducible:
Always

Steps to Reproduce:
1. Create new affinity group: 
test_cluster = api_instance.clusters.get(name="cl_35")
affinity_group = params.AffinityGroup(
    name='test_sdk', cluster=test_cluster, positive=True, enforcing=True
)
test_cluster.affinitygroups.add(affinity_group, correlation_id='111111222')
2.
3.

Actual results:
Method fail
Traceback (most recent call last):
  File "/home/alukiano/PycharmProjects/ART/art/tests/rhevm/unittests/local_test/python_sdk.py", line 18, in <module>
    test_cluster.affinitygroups.add(affinity_group, correlation_id='111111222')
TypeError: add() got an unexpected keyword argument 'correlation_id'

Expected results:
Method success with correct correlation_id

Additional info:
Same thing actual for update affinity group and delete

--- Additional comment from Juan Hernández on 2015-03-26 11:17:00 EDT ---

This happens because the correlation id header isn't documented correctly in the RSDL. Actually all the operations of the RESTAPI that potentially modify the state of the system support the correlation id header, but currently the process that generates the RSDL requires that it is explicitly documented in the rsdl_metadata.yaml file. This isn't ideal, so we will change that process so that the correlation id header is automatically generated for all the relevant operations.

Once this is fixed in the engine the SDKs will need to be regenerated.

Comment 1 Gonza 2015-08-11 11:16:18 UTC
Verified with:
ovirt-engine-sdk-java-3.6.0.0-0.620150303.git5407520.fc20.noarch
Against engine with:
ovirt-engine-3.6.0-0.0.master.20150804111407.git122a3a0.el6.noarch

The Java SDK request completes successfully.