Abstract node free disk space check
authorIustin Pop <iustin@google.com>
Sun, 14 Mar 2010 15:38:56 +0000 (16:38 +0100)
committerIustin Pop <iustin@google.com>
Mon, 15 Mar 2010 15:29:22 +0000 (16:29 +0100)
commit701384a9a07d0e9a5f1677b2838f0906967283df
treec4dd35fd885ade814a425a05c31c620759029342
parent5d55819e668a5a8028e9d776e81a197e9a1fad83
Abstract node free disk space check

Both create instance and grow disk check the free disk space on nodes
using the same, duplicate code. Since we'll need this in other places in
the future, we abstract the check into a new function.

The patch adjusts the error message to be more in-line with the one for
memory checking, and fixes the exception raised for RPC errors.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cmdlib.py