def _attachment_v2_to_v1(vol):
    """Converts v2 attachment details to v1 format."""
    d = []
    attachments = vol.pop('attachments', [])
    for attachment in attachments:
        a = {'id': attachment.get('id'),
             'attachment_id': attachment.get('attachment_id'),
             'volume_id': attachment.get('volume_id'),
             'server_id': attachment.get('server_id'),
             'host_name': attachment.get('host_name'),
             'device': attachment.get('device'),
             }
        d.append(a)

    return d