[openstack-dev] [zun][unit test] Any python utils can collect pci info?
hongbin.lu at huawei.com
Mon Sep 18 02:41:05 UTC 2017
I am not aware of any prevailing python utils for this. An alternative is to shell out Linux commands to collect the information. After a quick search, it looks xenapi  uses “lspci -vmmnk” to collect PCI device detail info and “ls /sys/bus/pci/devices/<pci_device>/” to detect the PCI device type (PF or VF). FWIW, you might find it helpful to refer the implementation of Nova’s xenapi driver for gettiing PCI resources . Hope it helps.
From: Shunli Zhou [mailto:shunli6658 at gmail.com]
Sent: September-17-17 9:35 PM
To: openstack-dev at lists.openstack.org
Subject: [openstack-dev] [zun][unit test] Any python utils can collect pci info?
For https://blueprints.launchpad.net/zun/+spec/support-pcipassthroughfilter this BP, Nova use the libvirt to collect the PCI device info. But for zun, libvirt seems is a heavy dependecies. Is there a python utils that can be used to collect the PCI device detail info? Such as the whether it's a PF of network pci device of VF, the device capabilities, etc.
Note: For 'lspci -D -nnmm' , there are some info can not get.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev