Using suds objects as keys for the DatastoreBrowser cache is incorrect
because they don't implement __eq__ and __hash__ for the VIM types.
This always results in cache miss and the cache grows with every spawn()
operation.
This patch fix this by using the 'value' property (which is string) of
the MoRef as key.
Reviewed: https:/ /review. openstack. org/97164 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=bceb3f96b06 ff8a04859872449 4299cf111bcaf8
Committed: https:/
Submitter: Jenkins
Branch: master
commit bceb3f96b06ff8a 048598724494299 cf111bcaf8
Author: Radoslav Gerganov <email address hidden>
Date: Mon Jun 2 10:21:45 2014 +0300
VMware: Fix memory leaks caused by caches
Using suds objects as keys for the DatastoreBrowser cache is incorrect
because they don't implement __eq__ and __hash__ for the VIM types.
This always results in cache miss and the cache grows with every spawn()
operation.
This patch fix this by using the 'value' property (which is string) of
the MoRef as key.
Change-Id: I2bcaf87e733d51 055566aee41bb0a 7e254027ba9
Closes-Bug: 1316433