From: Iustin Pop Date: Wed, 8 Jul 2009 17:11:45 +0000 (+0200) Subject: Simplify the Cluster.tryAlloc structures X-Git-Tag: htools-v0.1.5~4 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/685935f795f8782af9c7556d464fb122f51c9773?hp=685935f795f8782af9c7556d464fb122f51c9773 Simplify the Cluster.tryAlloc structures Currently the tryAlloc function calls the allocateOnSingle/allocateOnPair and the builds a new tuple with those functions's result plus the new node list. This is however suboptimal in two respects: - the new nodes added are the 'old' versions of the respective nodes, so even though we don't use more than their names, it's logically broken - we do an extra unpack/repack of the result, while we could simply pass it through if allocateOnX returned the correct result This patch makes the allocateOnX functions return the node list too and also removes them and applyMove from the export list, as these are only used within Cluster.hs. ---