On 06/28/2012 05:21 AM, guyanhua wrote: > > Signed-off-by: Gu Yanhua <[email protected]> > --- > client/virt/libvirt_vm.py | 21 +++++++++++++++++++-- > 1 files changed, 19 insertions(+), 2 deletions(-) > > diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py > index d97ac0c..d07ddce 100644 > --- a/client/virt/libvirt_vm.py > +++ b/client/virt/libvirt_vm.py > @@ -86,7 +86,7 @@ def service_libvirtd_control(action): > raise error.TestError("Unknown action: %s" % action) > > > -def virsh_cmd(cmd, uri="", ignore_status=False): > +def virsh_cmd(cmd, uri="", ignore_status=False, print_info=False): > """ > Append cmd to 'virsh' and execute, optionally return full results. > > @@ -101,7 +101,16 @@ def virsh_cmd(cmd, uri="", ignore_status=False): > if uri: > uri_arg = "-c " + uri > cmd = "%s %s %s" % (VIRSH_EXEC, uri_arg, cmd) > - return utils.run(cmd, verbose=DEBUG, ignore_status=ignore_status) > + if print_info: > + logging.debug("Running command: %s" % cmd) > + > + ret = utils.run(cmd, verbose=DEBUG, ignore_status=ignore_status) > + > + if print_info: > + logging.debug("status: %s" % ret.exit_status) > + logging.debug("stdout: %s" % ret.stdout.strip()) > + logging.debug("stderr: %s" % ret.stderr.strip()) > + return ret
Woops, sorry I didn't explain clearly. I already committed this virsh_cmd() update into 'next' branch. No need to include it here, just use it :) -- Chris Evich, RHCA, RHCE, RHCDS, RHCSS Quality Assurance Engineer e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
