mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
pollhelpers: Support nodedev listAllDevices
This commit is contained in:
parent
52e4976462
commit
ddba6098f6
@ -178,13 +178,18 @@ def fetch_interfaces(backend, origmap, build_func):
|
||||
|
||||
def fetch_nodedevs(backend, origmap, build_func):
|
||||
name = "nodedev"
|
||||
active_list = lambda: backend.listDevices(None, 0)
|
||||
inactive_list = lambda: []
|
||||
lookup_func = backend.nodeDeviceLookupByName
|
||||
|
||||
return _old_poll_helper(origmap, name,
|
||||
active_list, inactive_list,
|
||||
lookup_func, build_func)
|
||||
if backend.check_conn_support(
|
||||
backend.SUPPORT_CONN_LISTALLDEVICES):
|
||||
return _new_poll_helper(origmap, name,
|
||||
backend.listAllDevices,
|
||||
"name", build_func)
|
||||
else:
|
||||
active_list = lambda: backend.listDevices(None, 0)
|
||||
inactive_list = lambda: []
|
||||
lookup_func = backend.nodeDeviceLookupByName
|
||||
return _old_poll_helper(origmap, name,
|
||||
active_list, inactive_list,
|
||||
lookup_func, build_func)
|
||||
|
||||
|
||||
def _old_fetch_vms(backend, origmap, build_func):
|
||||
|
@ -320,6 +320,8 @@ SUPPORT_CONN_LISTALLSTORAGEPOOLS = _make(
|
||||
args=())
|
||||
SUPPORT_CONN_LISTALLINTERFACES = _make(function="virConnect.listAllInterfaces",
|
||||
args=())
|
||||
SUPPORT_CONN_LISTALLDEVICES = _make(function="virConnect.listAllDevices",
|
||||
args=())
|
||||
SUPPORT_CONN_VIRTIO_MMIO = _make(version=1001002,
|
||||
drv_version=[("qemu", 1006000)])
|
||||
SUPPORT_CONN_DISK_SD = _make(version=1001002)
|
||||
|
Loading…
Reference in New Issue
Block a user