Closed ibaldin closed 3 years ago
Requesting review at this point - I removed one of the tickets I was going to address in this PR because it is already huge. This requires an update to the control framework code that looks at delegations. Instead of being dictionaries sometimes and sometimes lists of dictionaries, capacity and label delegations now have a single unified format:
{ <id>: {
‘pool_id’: <pool id string>,
[‘capacities’ | 'labels']: <capacity or label dictionary> }
\<id> can be delegation id (e.g. 'default' or 'primary') on ARM/ADM graphs or it can be graph ID (ADM graph id) on CBM graphs. \<pool id string> is any string except '_' (see below).
{ <id>: {
'pool': <pool id string> {
Pool definition must be on one node (it also means it applies to that node) and pool references are put on all other nodes that are part of the pool.
{ <id>: {
'pool_id': '_',
['capacities' | 'labels']: <capacity or label dictionary> }
I will provide the CF code update as well as a separate PR.
See fim/slivers/delegations.py for implementation details - Delegations object knows how to serialize and deserialize itself.
Added more tests for merging/unmerging ADMs from CBM - it should be more robust now.
Still WiP - initial pull