List the status of Gentoo Linux Security Advisories

    glsa_list
         can contain an arbitrary number of GLSA ids, filenames
         containing GLSAs or the special identifiers 'all' and 'affected'

    Returns a dict containing glsa ids with a description, status, and CVEs:

    .. code-block:: python

        {<glsa_id>: {'description': <glsa_description>,
         'status': <glsa status>,
         'CVEs': [<list of CVEs>]}}

    CLI Example:

    .. code-block:: bash

        salt '*' gentoolkit.glsa_check_list 'affected'

def glsa_check_list(glsa_list):
    '''
    List the status of Gentoo Linux Security Advisories

    glsa_list
         can contain an arbitrary number of GLSA ids, filenames
         containing GLSAs or the special identifiers 'all' and 'affected'

    Returns a dict containing glsa ids with a description, status, and CVEs:

    .. code-block:: python

        {<glsa_id>: {'description': <glsa_description>,
         'status': <glsa status>,
         'CVEs': [<list of CVEs>]}}

    CLI Example:

    .. code-block:: bash

        salt '*' gentoolkit.glsa_check_list 'affected'
    '''
    cmd = 'glsa-check --quiet --nocolor --cve --list '
    if isinstance(glsa_list, list):
        for glsa in glsa_list:
            cmd += glsa + ' '
    elif glsa_list == 'all' or glsa_list == 'affected':
        cmd += glsa_list

    ret = dict()
    out = __salt__['cmd.run'](cmd, python_shell=False).split('\n')
    ret = _glsa_list_process_output(out)
    return ret