Description of problem: According to the documentation [1] the iscsi discovery should return iscsi_details, but for python sdk it only returns iscsi_targets. [1] https://github.com/oVirt/ovirt-engine-api-model/blob/master/src/main/java/services/HostService.java#L675-L698 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Use iscsi discovery with python sdk Example from ansible module (https://github.com/oVirt/ovirt-ansible-collection/blob/master/plugins/modules/ovirt_host.py#L615-L623) 2. Check out the response 3. Actual results: Returns list of strings with iscsi targets Expected results: Return IscsiDetails Additional info:
The reason for this bug is an architectural constraint in the SDKs, which denies the possibility to deprecate an output parameter of an action. Due to this constraint, this patch: https://gerrit.ovirt.org/c/ovirt-engine-api-model/+/84198/ did not work as designed, resulting in this bugzilla. Changing the SDK architecture to support deprecating output parameters of an action does not justify the ROI, as the present bug is only such case in recent memory. Should additional cases present themselves, this decision will be reevaluated. model patch: https://gerrit.ovirt.org/c/ovirt-engine-api-model/+/113492 engine patch: https://gerrit.ovirt.org/c/ovirt-engine/+/113493
All referenced patches are merged, can you please update on this bug status?
Verified on: ovirt-engine-4.4.6.6-0.10.el8ev.noarch ovirt-engine-sdk-python==4.4.12 Steps: 1. # cat test_iscsi.py import ovirtsdk4 as sdk import ovirtsdk4.types as otypes connection = sdk.Connection( url='https://<engine-fqdn>/ovirt-engine/api', username='admin@internal', password=<password>, insecure=True, debug=True, ) hosts_service = connection.system_service().hosts_service() host_id = "b952649e-5c15-4f14-af8e-56e45fd01aab" iscsi_targets = hosts_service.service(host_id).iscsi_discover( iscsi=otypes.IscsiDetails( port=3260, address=<iscsi-addr>, ), ) print(iscsi_targets) connection.close() 2. # python3 test_iscsi.py ['iqn.200...., 'iqn.200...., 'iqn.200..., 'iqn.200...] Results: iscsi targets discovered, via sdk, as expected
This bugzilla is included in oVirt 4.4.6 release, published on May 4th 2021. Since the problem described in this bug report should be resolved in oVirt 4.4.6 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.