In various places, own version of iterating over the results are implemented,
sometimes even faulty.
The following functions where only getting up to vmware.maximum_objects objects (100 by default)
vm_util.get_all_cluster_mors, vm_util.get_stats_from_cluster.
Previously, the results were fetched in batches of up to vmware.maximum_objects items.
Using WithRetrieval yields an iterator to the results, which pages transparently to
the next request.
Consumers of the output of the results where changed to work on an iterator, where easily
possible.
Replaced the quadratic algorithm in `ds_util._filter_datastores_matching_storage_policy`
with one of O(n log(n)) runtime
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /804968 /opendev. org/openstack/ nova/commit/ d31b26e09d46974 8f2ae2cc1e5f6f5 7401834adc
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d31b26e09d46974 8f2ae2cc1e5f6f5 7401834adc
Author: Fabian Wiesel <email address hidden>
Date: Tue Aug 17 16:36:06 2021 +0200
VMWare: Use WithRetrieval to get all results
In various places, own version of iterating over the results are implemented, maximum_ objects objects (100 by default) util.get_ all_cluster_ mors, vm_util. get_stats_ from_cluster.
sometimes even faulty.
The following functions where only getting up to vmware.
vm_
Previously, the results were fetched in batches of up to vmware. maximum_ objects items.
Using WithRetrieval yields an iterator to the results, which pages transparently to
the next request.
Consumers of the output of the results where changed to work on an iterator, where easily
possible.
Replaced the quadratic algorithm in `ds_util. _filter_ datastores_ matching_ storage_ policy`
with one of O(n log(n)) runtime
Closes-Bug: #1940399 b32527d1b874593 3d044e22734
Change-Id: I8283c3e76c595c