def get_ifname_by_pci_address(pci_addr, pf_interface=False):
 dev_path = _get_sysfs_netdev_path(pci_addr, pf_interface)
 try:
  dev_info = os.listdir(dev_path)
  return dev_info.pop()
 except Exception:
  raise exception.PciDeviceNotFoundById(id=pci_addr)

def get_ifname_by_pci_address ( pci_addr , pf_interface = False ) : dev_path = _get_sysfs_netdev_path ( pci_addr , pf_interface ) try : dev_info = os . listdir ( dev_path ) return dev_info . pop ( ) except Exception : raise exception . PciDeviceNotFoundById ( id = pci_addr )
get the interface name based on a vfs pci address the returned interface name is either the parent pfs or that of the vf itself based on the argument of pf_interface .