Description of problem: Currently when the SDK tries to read an empty list of elements, without a close tag, it fails to detect the end of the list correctly, and it includes the in the list the next elements. Version-Release number of selected component (if applicable): 4.1.0.a How reproducible: Always. Steps to Reproduce: 1. Make sure that at least one cluster has an empty list of required RNG sources. 2. Use the SDK to list the cluster: ---8<--- import ovirtsdk4 as sdk import ovirtsdk4.types as types connection = sdk.Connection( url='https://engine41.example.com/ovirt-engine/api', username='admin@internal', password='...', ca_file='ca.pem', ) clusters_service = connection.system_service().clusters_service() clusters = clusters_service.list() for cluster in clusters: print("%s: %s" % (cluster.name, cluster.id)) connection.close() ---8<--- Actual results: Traceback (most recent call last): File "./list_clusters.py", line 43, in <module> clusters = clusters_service.list() File "/files/projects/ovirt-engine-sdk-python/repository/sdk/lib/ovirtsdk4/services.py", line 3028, in list return readers.ClusterReader.read_many(reader) File "/files/projects/ovirt-engine-sdk-python/repository/sdk/lib/ovirtsdk4/readers.py", line 1791, in read_many objs.append(ClusterReader.read_one(reader)) File "/files/projects/ovirt-engine-sdk-python/repository/sdk/lib/ovirtsdk4/readers.py", line 1744, in read_one obj.required_rng_sources = [types.RngSource(s.lower()) for s in Reader.read_strings(reader)] AttributeError: 'NoneType' object has no attribute 'lower' (Note that the backtrace may be different, depending on the actual content of the retrived cluster). Expected results: This should print the list of cluster names and identifiers: Default: 00000002-0002-0002-0002-00000000017a mycluster: 72e982ce-e010-4736-b8ab-dd31a8949f19
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Verified on 4.0.4-3