To support this, I've added a fake libvirt implementation. It's supposed to expose an API and behaviour identical to that of libvirt itself except without actually running any VM's or setting up any firewall or anything, but still responding correctly when asked for a domain's XML, a list of defined domains, running domains, etc. I've also split out everything from libvirt.connection that is potentially destructive or otherwise undesirable to run during testing, and moved it to a new nova.virt.libvirt.utils. I added tests for those things separately as well as stub version of it for testing. I hope eventually to make it similar to fakelibvirt in style (e.g. keep track of files created and deleted and attempts to open a file that it doesn't know about, you'll get proper exceptions with proper errnos set and whatnot). Change-Id: Id90b260933e3443b4ffb3b29e4bc0cbc82c19ba6
16 KiB
16 KiB