I'm sorry, please ignore this. Thanks! δΊ 2012-2-13 11:36, guyanhua ει: > Hi All: > > This patch adds two new API to libvirt_vm.py file: > libvirtd_stop() and libvirtd_start() . > > > 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..0e46d90 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 > >
_______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
