def sort_and_format_devices(devices):
    """
    Takes a list of dicts devices and returns a list of dicts.
    Sorts by SCSI ID acending (0 to 7).
    For SCSI IDs where no device is attached, inject a dict with placeholder text.
    """
    occupied_ids = []
    for d in devices:
        occupied_ids.append(d["id"])

    formatted_devices = devices

    # Add padding devices and sort the list
    for id in range(8):
        if id not in occupied_ids:
            formatted_devices.append({"id": id, "device_type": "-", \
                    "status": "-", "file": "-", "product": "-"})
    # Sort list of devices by id
    formatted_devices.sort(key=lambda dic: str(dic["id"]))

    return formatted_devices