Files
placement/placement/objects/allocation_candidate.py
Balazs Gibizer 815dcd8c93 Factor out allocation candidate generation strategy
This is a pure refactor to pull out the logic of assembling an
allocation candidate.

The _get_areq_list_generators returns a set of
generators, one per root (anchoring) provider, that can generate all the
viable candidates for that root by applying a product on the solutions
for each request groups.

The _generate_areq_lists implements the strategy of consuming these
generators. The current behavior is that placement consumes the
generator for the first root fully before moving to the next
(depth-first).

A later patch will change _generate_areq_lists to be able to apply
different strategies, like round-robin easily.

Related-Bug: #2070257
Change-Id: I4f8c8491d21426310a82df7186b7689b2dad253e
(cherry picked from commit 04718d65b6)
(cherry picked from commit 1b0a927203)
(cherry picked from commit dc4ffdc4f8)
2025-01-10 18:03:58 +01:00

43 KiB