On 02/13/2012 06:15 AM, guyanhua wrote:
> Hi All:
> 
> This patch adds two new API to libvirt_vm.py file:
> libvirtd_stop() and libvirtd_start().

Applied, with minor corrections of wrong spacing and capitalization:

https://github.com/autotest/autotest/commit/934d90b0e8c103eb2045881496838684bed00fc7

Thanks!

> Signed-off-by: Gu Yanhua<[email protected]>
> ---
>   client/virt/libvirt_vm.py |   24 ++++++++++++++++++++++++
>   1 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
> index 6c0e687..dbe7fab 100644
> --- a/client/virt/libvirt_vm.py
> +++ b/client/virt/libvirt_vm.py
> @@ -29,6 +29,30 @@ def libvirtd_restart():
>           logging.error("Failed to restart libvirtd:\n%s", detail)
>           return False
> 
> +def libvirtd_stop():
> +    """
> +    Stop libvirt daemon.
> +    """
> +    try:
> +        utils.run("service libvirtd  stop")
> +        logging.debug("Stop  libvirtd  successfuly")
> +        return True
> +    except error.CmdError, detail:
> +        logging.error("Failed to Stop  libvirtd:\n%s", detail)
> +        return False
> +
> +def libvirtd_start():
> +    """
> +    Start libvirt daemon.
> +    """
> +    try:
> +        utils.run("service libvirtd  start")
> +        logging.debug("Start  libvirtd  successfuly")
> +        return True
> +    except error.CmdError, detail:
> +        logging.error("Failed to Start  libvirtd:\n%s", detail)
> +        return False
> +
> 
>   def virsh_cmd(cmd, uri = ""):
>       """
> --
> 1.7.1
> 

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to