RunCmd: Support standard input file descriptor
authorMichael Hanselmann <hansmi@google.com>
Tue, 23 Oct 2012 19:25:30 +0000 (21:25 +0200)
committerMichael Hanselmann <hansmi@google.com>
Fri, 26 Oct 2012 14:27:00 +0000 (16:27 +0200)
commitd5d76ab2e02109d556bc7be837a1c46225982494
tree0444d3ba6987d785306268fea951d71588f5adf5
parentfeec4cc5c269bd2c49a51a6fbd2ee9b41377e870
RunCmd: Support standard input file descriptor

This patch changes “utils.RunCmd” to accept a file-like object or a
numeric file descriptor which will be used as the command's standard
input. One use-case will be to pass all necessary data to
“prepare-node-join”.

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