summaryrefslogtreecommitdiff
path: root/nova/manager.py
diff options
context:
space:
mode:
authorJohannes Kulik <johannes.kulik@sap.com>2021-04-14 15:52:09 +0200
committerJohannes Kulik <johannes.kulik@sap.com>2021-04-14 16:12:41 +0200
commitcf4b152b6b9ec137b49d903aa0f4ccc821a087cc (patch)
treeada0564bf6ae8ec278808a817d78e6e8060f0af8 /nova/manager.py
parent6ce1272a62b6593f9b8474a93a0b41a18a13a80f (diff)
downloadnova-cf4b152b6b9ec137b49d903aa0f4ccc821a087cc.tar.gz
vmware: Handle empty list attributes on vSphere objects
We want to switch the SOAP library backing oslo.vmware [1] and the new library differs in how empty lists are returned. The old library SUDS didn't set attributes if they were empty lists. The new library sets those attributes to empty lists. Therefore, every check with `hasattr()` that later on accesses a single element instead of iterating over the whole list needs to be changed to also check that the list contains elements. This ensures compatiblity between the backend library versions. [1] https://specs.openstack.org/openstack/oslo-specs/specs/victoria/oslo-vmware-soap-library-switch.html Change-Id: I9322037cd47ace83fbcb19bbbe051e2feb9af2c7
Diffstat (limited to 'nova/manager.py')
0 files changed, 0 insertions, 0 deletions