mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
connection: Drop unused filter_nodedevs devcap value
This commit is contained in:
@@ -595,7 +595,7 @@ class vmmConnection(vmmGObject):
|
||||
# nodedev helper functions #
|
||||
############################
|
||||
|
||||
def filter_nodedevs(self, devtype=None, devcap=None):
|
||||
def filter_nodedevs(self, devtype):
|
||||
retdevs = []
|
||||
for dev in self.list_nodedevs():
|
||||
try:
|
||||
@@ -610,13 +610,7 @@ class vmmConnection(vmmGObject):
|
||||
if devtype and xmlobj.device_type != devtype:
|
||||
continue
|
||||
|
||||
if devcap:
|
||||
if (not hasattr(xmlobj, "capability_type") or
|
||||
xmlobj.capability_type != devcap):
|
||||
continue
|
||||
|
||||
retdevs.append(dev)
|
||||
|
||||
return retdevs
|
||||
|
||||
|
||||
|
||||
@@ -2412,7 +2412,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
devtype = 'usb_device'
|
||||
|
||||
nodedev = None
|
||||
for trydev in self.vm.conn.filter_nodedevs(devtype, None):
|
||||
for trydev in self.vm.conn.filter_nodedevs(devtype):
|
||||
if trydev.xmlobj.compare_to_hostdev(hostdev):
|
||||
nodedev = trydev.xmlobj
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class vmmMediaCombo(vmmGObjectUI):
|
||||
|
||||
def _make_nodedev_rows(self, media_type):
|
||||
rows = []
|
||||
for nodedev in self.conn.filter_nodedevs(devtype="storage"):
|
||||
for nodedev in self.conn.filter_nodedevs("storage"):
|
||||
if not (nodedev.xmlobj.device_type == "storage" and
|
||||
nodedev.xmlobj.drive_type in ["cdrom", "floppy"]):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user