Abstract node memory checking into a separate function
authorIustin Pop <iustin@google.com>
Mon, 28 Jan 2008 14:42:12 +0000 (14:42 +0000)
committerIustin Pop <iustin@google.com>
Mon, 28 Jan 2008 14:42:12 +0000 (14:42 +0000)
commit4cc4c4a041fdfc6dbc39575dc5032780f553f19b
tree3e312c5bddfd26220ce2adecdbfd871b8512d74c
parent3b1b1a52329b30d8382c026787ffbfa11d47fb02
Abstract node memory checking into a separate function

The checking of a node's free memory (via rpc.call_node_info) is done in
both start instance an failover. This patch abstracts this call,
together with the appropriate error handling, into a separate function
called _CheckNodeFreeMemory.

The patch also has some related changes:
  - the check is done in prereq and not in exec for start instance
  - the redundant check in exec for failover has been removed

Reviewed-by: ultrotter
lib/cmdlib.py