search for: simora

Displaying 3 results from an estimated 3 matches for "simora".

Did you mean: simona
2020 Aug 22
3
python-libvirt domain.destroy() doesn't appear to be working for me
I'm using the python-libvirt library and finding that I cannot get .destroy() or .shutdown() to work. https://github.com/simora/docker-libvirt-flask/blob/cba6041b47bdf4ccb3b9506a0379cf8c788a9a57/root/app/mqtt.py#L96 That is the line in my code. .create() works fine and using virsh in the docker container works fine to destroy the domain as well. This is based on ubuntu bionic in a docker container with the libvirt socket...
2020 Aug 24
0
Re: python-libvirt domain.destroy() doesn't appear to be working for me
On Sat, Aug 22, 2020 at 10:32:09AM -0400, Jeremy Markle wrote: > I'm using the python-libvirt library and finding that I cannot get > .destroy() or .shutdown() to work. > > https://github.com/simora/docker-libvirt-flask/blob/cba6041b47bdf4ccb3b9506a0379cf8c788a9a57/root/app/mqtt.py#L96 Your code has alot of "< 0" checks. This is the C API behaviour to return -1 on error. In python we raise exceptions on error. so you try try/except to catch them Daniel
2020 Aug 24
2
Re: python-libvirt domain.destroy() doesn't appear to be working for me
...05:31 Daniel P. Berrangé <berrange@redhat.com> wrote: > On Sat, Aug 22, 2020 at 10:32:09AM -0400, Jeremy Markle wrote: > > I'm using the python-libvirt library and finding that I cannot get > > .destroy() or .shutdown() to work. > > > > > https://github.com/simora/docker-libvirt-flask/blob/cba6041b47bdf4ccb3b9506a0379cf8c788a9a57/root/app/mqtt.py#L96 > > Your code has alot of "< 0" checks. This is the C API behaviour to return > -1 > on error. In python we raise exceptions on error. so you try try/except to > catch them > >...