'Get host PCI devices information.
Obtains pci devices information from libvirt, and returns
as a JSON string.
Each device information is a dictionary, with mandatory keys
of \'address\', \'vendor_id\', \'product_id\', \'dev_type\', \'dev_id\',
\'label\' and other optional device specific information.
Refer to the objects/pci_device.py for more idea of these keys.
:returns: a JSON string containing a list of the assignable PCI
devices information'

def _get_pci_passthrough_devices(self):

    if (not getattr(self, '_list_devices_supported', True)):
        return jsonutils.dumps([])
    try:
        dev_names = (self._host.list_pci_devices() or [])
    except libvirt.libvirtError as ex:
        error_code = ex.get_error_code()
        if (error_code == libvirt.VIR_ERR_NO_SUPPORT):
            self._list_devices_supported = False
            LOG.warning('URI    %(uri)s    does    not    support    listDevices:    %(error)s', {'uri': self._uri(), 'error': ex})
            return jsonutils.dumps([])
        else:
            raise
    pci_info = []
    for name in dev_names:
        pci_info.append(self._get_pcidev_info(name))
    return jsonutils.dumps(pci_info)
