'Match a device to this PciAddress.  Assume this is called given
pci_addr and pci_phys_addr reported by libvirt, no attempt is made to
verify if pci_addr is a VF of pci_phys_addr.
:param pci_addr: PCI address of the device to match.
:param pci_phys_addr: PCI address of the parent of the device to match
(or None if the device is not a VF).'

def match(self, pci_addr, pci_phys_addr):

    if (self.is_physical_function and pci_phys_addr):
        pci_phys_addr_obj = PhysicalPciAddress(pci_phys_addr)
        if self.pci_address_spec.match(pci_phys_addr_obj):
            return True
    pci_addr_obj = PhysicalPciAddress(pci_addr)
    return self.pci_address_spec.match(pci_addr_obj)
