def add_sshpubkey_to_attrs_pre(context, attrs_list):
    """
    Attribute ipasshpubkey should be added to attrs_list to be able compute
    ssh fingerprint. This attribute must be removed later if was added here
    (see remove_sshpubkey_from_output_post).
    """
    if not ('ipasshpubkey' in attrs_list or '*' in attrs_list):
        setattr(context, 'ipasshpubkey_added', True)
        attrs_list.append('ipasshpubkey')
