>>> +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
> I want a common method to control libvirtd service instead of constantly
> wrapper new
> function, for instance, the following other actions are very useful. Do
> you want to wrapper
> all of them?
>
> # service libvirtd
> Usage: /etc/init.d/libvirtd
> {start|stop|status|restart|condrestart|reload|force-reload|try-restart}
>
> Maybe, a service_libvirtd_control(action="") are enough, the parameter
> 'action' may be the above
> 'start', 'stop' and 'reload' etc.
>
> Regards,
> Alex
Ok, I got it. Working on it. Thanks!
>>> +
>>>
>>> def virsh_cmd(cmd, uri = ""):
>>> """
>>> --
>>> 1.7.1
>>
>> This is a great addition! If you have any, we could probably use some
>> more tests in/around the host libvirt stop/start/restart area. My only
>> feedback would be that we could maybe also use similar functions for
>> dnsmasq stop/start. I've noticed that libvirtd will start it (if
>> required) but it doesn't always shut down the dnsmasq service. That can
>> cause problems relating to open FDs and sockets if/when libvirtd starts
>> again or any host network reconfiguration is needed.
>>
>> Either way, this is a welcome addition. Thanks!
>>
>
> _______________________________________________
> 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