libvirt: update uri_whitelist in fakelibvirt.Connection

Commit 4b9bec3a1c removed the mocking of
nova.virt.libvirt.host.Host.get_connection to use fakelibvirt instead,
but if you don't have libvirt-python in your venv the tests fail, so
fakelibvirt in it's current form wasn't actually working for all tests.

This change updates the uri_whitelist in the init method of the
fakelibvirt Connection class to add some other URIs found in other parts
of the libvirt code (the LibvirtDriver.uri static method).

Removes the unnecessary 'xen:///system' whitelisted URI.

Since libvirt-python is no longer needed to run the libvirt driver
unit tests, it's removed from test-requirements.txt.

Closes-Bug: #1414708

Change-Id: Id7aefe9bf21dc3d0e2db42e668faf28e926aea43
This commit is contained in:
Matt Riedemann 2015-01-26 13:12:52 -08:00
parent 416399a584
commit 50861d3221
2 changed files with 2 additions and 2 deletions

View File

@ -652,7 +652,8 @@ class Connection(object):
uri_whitelist = ['qemu:///system',
'qemu:///session',
'xen:///system',
'lxc:///', # from LibvirtDriver.uri()
'xen:///', # from LibvirtDriver.uri()
'uml:///system',
'test:///default']

View File

@ -6,7 +6,6 @@ hacking>=0.10.0,<0.11
coverage>=3.6
discover
fixtures>=0.3.14
libvirt-python>=1.2.5 # LGPLv2+
mock>=1.0
mox3>=0.7.0
MySQL-python