def get_instance_pci_devs(inst, request_id=None):
 pci_devices = inst.pci_devices
 if (pci_devices is None):
  return []
 return [device for device in pci_devices if ((device.request_id == request_id) or (request_id == 'all'))]

def get_instance_pci_devs ( inst , request_id = None ) : pci_devices = inst . pci_devices if ( pci_devices is None ) : return [ ] return [ device for device in pci_devices if ( ( device . request_id == request_id ) or ( request_id == 'all' ) ) ]
get the devices allocated to one or all requests for an instance .