connection: get_devices -> get_nodedevs for consistency
This commit is contained in:
parent
16e43da0ae
commit
86f4bdaf1d
|
@ -497,9 +497,9 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
subdevs = []
|
||||
|
||||
if subtype:
|
||||
subdevs = self.vm.get_connection().get_devices(subtype, subcap)
|
||||
subdevs = self.vm.get_connection().get_nodedevs(subtype, subcap)
|
||||
|
||||
devs = self.vm.get_connection().get_devices(devtype, devcap)
|
||||
devs = self.vm.get_connection().get_nodedevs(devtype, devcap)
|
||||
for dev in devs:
|
||||
prettyname = dev.pretty_name()
|
||||
|
||||
|
|
|
@ -688,7 +688,7 @@ class vmmConnection(vmmGObject):
|
|||
return self.interfaces[name]
|
||||
def get_nodedev(self, name):
|
||||
return self.nodedevs[name]
|
||||
def get_devices(self, devtype=None, devcap=None):
|
||||
def get_nodedevs(self, devtype=None, devcap=None):
|
||||
retdevs = []
|
||||
for vdev in self.nodedevs.values():
|
||||
if devtype and vdev.device_type != devtype:
|
||||
|
|
|
@ -506,7 +506,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
|||
iface_list = []
|
||||
row_dict = {}
|
||||
|
||||
for phys in self.conn.get_devices("net"):
|
||||
for phys in self.conn.get_nodedevs("net"):
|
||||
row_dict[phys.interface] = [phys.interface,
|
||||
False, False, phys.interface,
|
||||
"ethernet", False, True, None,
|
||||
|
|
|
@ -228,7 +228,7 @@ class vmmCreatePool(vmmGObjectUI):
|
|||
use_list.set_active(0)
|
||||
|
||||
def list_scsi_adapters(self):
|
||||
scsi_hosts = self.conn.get_devices("scsi_host")
|
||||
scsi_hosts = self.conn.get_nodedevs("scsi_host")
|
||||
host_list = map(lambda dev: dev.host, scsi_hosts)
|
||||
|
||||
clean_list = []
|
||||
|
|
|
@ -194,7 +194,7 @@ def lookup_nodedev(vmmconn, hostdev):
|
|||
if devtype == 'usb':
|
||||
devtype = 'usb_device'
|
||||
|
||||
devs = vmmconn.get_devices(devtype, None)
|
||||
devs = vmmconn.get_nodedevs(devtype, None)
|
||||
for dev in devs:
|
||||
# Try to get info from {product|vendor}_id
|
||||
if (attrVal(dev, "product_id") == product_id and
|
||||
|
|
Loading…
Reference in New Issue