def format_pci_addr(pci_addr):
    """Pad a PCI address eg 0:0:1.1 becomes 0000:00:01.1

    :param pci_addr: str
    :return pci_addr: str
    """
    domain, bus, slot_func = pci_addr.split(':')
    slot, func = slot_func.split('.')
    return '{}:{}:{}.{}'.format(domain.zfill(4), bus.zfill(2), slot.zfill(2),
                                func)