def _translate_attachment_summary_view(_context, vol):
    """Maps keys for attachment summary view."""
    d = {}

    storage_pool_id = vol['id']

# NOTE(justinsb): We use the storage_pool id as the id of the attachment object
    d['id'] = storage_pool_id

    d['storage_pool_id'] = storage_pool_id
    d['server_id'] = vol['instance_uuid']
    if vol.get('mountpoint'):
        d['device'] = vol['mountpoint']

    return d