cmdlib: Add generic algorithm for modifying NICs/disks
authorMichael Hanselmann <hansmi@google.com>
Fri, 10 Feb 2012 16:57:23 +0000 (17:57 +0100)
committerMichael Hanselmann <hansmi@google.com>
Mon, 13 Feb 2012 15:20:31 +0000 (16:20 +0100)
commit8301885bdb0140b28f767503d18053af5d5b4552
tree7e002f2b90db18d9f24c74be6a62eb6fba50fc26
parent0813170b9fac2bf139779fac9db928b929aac557
cmdlib: Add generic algorithm for modifying NICs/disks

While preparing this patch series I identified at least three different
implementations of the algorithm for adding/removing/changing
NICs/disks. These two functions and corresponding unittests provide a
generic implementation with added support for adding/removing arbitrary
disks or NICs.

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