def vpd()

in pci_lib/pci_lib.py [0:0]


    def vpd(self):
        vpdfile = '{}{}/vpd'.format(SYSFS_PCI_BUS_DEVICES, self.device_name)
        if os.path.exists(vpdfile):
            try:
                vpdreader = VitalProductDataReader(vpdfile)
                return {'identifier_string': vpdreader.identifier_string,
                        'fields': vpdreader.fields}
            except VPDDataException:
                return None
            except OSError:
                # VPD was unreadable, rather than readable but unparseable.
                return None
        return None