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 commit04718d65b6) (cherry picked from commit1b0a927203) (cherry picked from commitdc4ffdc4f8)
43 KiB
43 KiB