IAllocators should not put instances on nodes in nodegroups which are
not connected to the network the instance should be connected to.
Therefore, export the networks a node group is connected to to the
IAllocator, so it can account for this restriction.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
ng = dict((guuid, {
"name": gdata.name,
"alloc_policy": gdata.alloc_policy,
+ "networks": [net_uuid for net_uuid, _ in gdata.networks.items()],
"ipolicy": gmi.CalculateGroupIPolicy(cluster, gdata),
"tags": list(gdata.GetTags()),
})