Split BuildHooksEnv of LUs
authorMichael Hanselmann <hansmi@google.com>
Fri, 18 Mar 2011 12:08:08 +0000 (13:08 +0100)
committerMichael Hanselmann <hansmi@google.com>
Fri, 18 Mar 2011 14:53:42 +0000 (15:53 +0100)
commit07e0896f6bce624453a983b2d44d557181c25b35
tree80dc3192df8e28dadb83f031a185a5bb47c3aeec
parent959b6fe59ef06552f19f9b20bf85614bfe5c977e
Split BuildHooksEnv of LUs

Commit dd7f677623 added another call to BuildHooksEnv to provide
post-phase status variables. Since BuildHooksEnv also built the node
lists, that meant they have to be built twice. First a rather strict
check was used, but it turned out to be more tricky. Commit b423c51336
had to remove the strict check again.

With this patch the function is split in two parts, one generating the
actual environment variables, and another part returning the node lists.
The former is called twice.

Unittests are updated.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
lib/cmdlib.py
lib/mcpu.py
test/ganeti.hooks_unittest.py