'Defining mocks for LibvirtDriver(libvirt is not used).'

def create_fake_libvirt_mock(self, **kwargs):

    class FakeLibvirtDriver(object, ):
        def defineXML(self, xml):
            return FakeVirtDomain()
    fake = FakeLibvirtDriver()
    for (key, val) in kwargs.items():
        fake.__setattr__(key, val)
    self.stubs.Set(libvirt_driver.LibvirtDriver, '_conn', fake)
    self.stubs.Set(host.Host, 'get_connection', (lambda x: fake))
