'Check if VF is assigned.
Checks if a given vf index of a given device name is assigned
by checking the relevant path in the system:
VF is assigned if:
Direct VF: PCI_PATH does not exist.
Macvtap VF: macvtap@<vf interface> interface exists in ip link show
@param dev_name: pf network device name
@param vf_index: vf index
@param ip_link_show_output: \'ip link show\' output'

@classmethod
def is_assigned_vf(cls, dev_name, vf_index, ip_link_show_output):

    if (not cls.pf_device_exists(dev_name)):
        return False
    path = (cls.PCI_PATH % (dev_name, vf_index))
    try:
        ifname_list = os.listdir(path)
    except OSError:
        return True
    for ifname in ifname_list:
        if pci_lib.PciDeviceIPWrapper.is_macvtap_assigned(ifname, ip_link_show_output):
            return True
    return False
