iallocator: factor out instance memory summation
authorHelga Velroyen <helgav@google.com>
Tue, 25 Jun 2013 12:15:58 +0000 (14:15 +0200)
committerHelga Velroyen <helgav@google.com>
Thu, 27 Jun 2013 09:08:41 +0000 (11:08 +0200)
commit0ac34c9078e4d5196680bb0af91de565644f4f1e
tree6bcb0a68ba5704c4923cf5207e4653973dd18aef
parent11aa3ca5078eed640e5037276cd387f3c3b63f43
iallocator: factor out instance memory summation

The iallocator adjusts the free memory by a calculation
of how much memory is actually currently used by instances
on the node. This calculation is rather complicated and
deserves its own function to increase testability. No
functional changes in this patch otherwise.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
lib/masterd/iallocator.py