Dan Kenigsberg has submitted this change and it was merged.
Change subject: utils: add CommandStream class ......................................................................
utils: add CommandStream class
This patch adds CommandStream a generic class to process the output of external commands (both stdout and stderr) as soon as available. For this purpose CommandStream provides the ability to define callbacks that will be executed when data is available from the external command.
This class is the foundation for long-running commands that are able to provide their progress during execution: their output must be processed as soon as possible to maintain and report status updates.
Change-Id: Ie015368bb9c5992e5c73a149277c59fc4ffbd570 Signed-off-by: Federico Simoncelli fsimonce@redhat.com Reviewed-on: https://gerrit.ovirt.org/33909 Reviewed-by: Adam Litke alitke@redhat.com Reviewed-by: Nir Soffer nsoffer@redhat.com --- M lib/vdsm/utils.py M tests/testlib.py M tests/utilsTests.py 3 files changed, 171 insertions(+), 0 deletions(-)
Approvals: Nir Soffer: Looks good to me, but someone else must approve Adam Litke: Looks good to me, approved Federico Simoncelli: Verified