Revert "libvirt: Wrap un-proxied listDevices() and listAllDevices()"
This reverts commit 0fccb365dd.
Reason for revert: the current version does not have test coverage to assert the proxy is used so we should revert this and fix it before backporting
Change-Id: I51cf7da85e05131da72acdcf9be09121a326d414
This commit is contained in:
@@ -1647,9 +1647,7 @@ class Host(object):
|
||||
:returns: a list of virNodeDevice instance
|
||||
"""
|
||||
try:
|
||||
devs = [self._wrap_libvirt_proxy(dev)
|
||||
for dev in self.get_connection().listDevices(cap, flags)]
|
||||
return devs
|
||||
return self.get_connection().listDevices(cap, flags)
|
||||
except libvirt.libvirtError as ex:
|
||||
error_code = ex.get_error_code()
|
||||
if error_code == libvirt.VIR_ERR_NO_SUPPORT:
|
||||
@@ -1669,10 +1667,7 @@ class Host(object):
|
||||
:returns: a list of virNodeDevice instances.
|
||||
"""
|
||||
try:
|
||||
alldevs = [
|
||||
self._wrap_libvirt_proxy(dev)
|
||||
for dev in self.get_connection().listAllDevices(flags)] or []
|
||||
return alldevs
|
||||
return self.get_connection().listAllDevices(flags) or []
|
||||
except libvirt.libvirtError as ex:
|
||||
LOG.warning(ex)
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user