List installed pecl extensions.

    CLI Example:

    .. code-block:: bash

        salt '*' pecl.list
199756
def list_(channel=None):
    '''
    
    '''
    pecl_channel_pat = re.compile('^([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)')
    pecls = {}
    command = 'list'
    if channel:
        command = '{0} -c {1}'.format(command, _cmd_quote(channel))
    lines = _pecl(command).splitlines()
    lines = (l for l in lines if pecl_channel_pat.match(l))

    for line in lines:
        match = pecl_channel_pat.match(line)
        if match:
            pecls[match.group(1)] = [match.group(2), match.group(3)]

    return pecls
350648
def list_installed():
    '''
    
    '''
    pkg_re = re.compile(r'^{0}-[\d.-]+-{1}$'.format(
        _package_prefix(), _kernel_type()))
    pkgs = __salt__['pkg.list_pkgs'](versions_as_list=True)
    if pkgs is None:
        pkgs = []

    result = list(filter(pkg_re.match, pkgs))
    if result is None:
        return []

    prefix_len = len(_package_prefix()) + 1

    if six.PY2:
        return sorted([pkg[prefix_len:] for pkg in result], cmp=_cmp_version)
    else:
        return sorted([pkg[prefix_len:] for pkg in result], key=functools.cmp_to_key(_cmp_version))
195940
def group_list():
    '''
    
    '''

    ret = {'installed': [],
        'partially_installed': [],
        'available': []}

    # find out what's available

    cmd = ['pacman', '-Sgg']
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)

    available = {}

    for line in salt.utils.itertools.split(out, '\n'):
        if not line:
            continue
        try:
            group, pkg = line.split()[0:2]
        except ValueError:
            log.error('Problem parsing pacman -Sgg: Unexpected formatting in '
                      'line: \'%s\'', line)
        else:
            available.setdefault(group, []).append(pkg)

    # now get what's installed

    cmd = ['pacman', '-Qg']
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)
    installed = {}
    for line in salt.utils.itertools.split(out, '\n'):
        if not line:
            continue
        try:
            group, pkg = line.split()[0:2]
        except ValueError:
            log.error('Problem parsing pacman -Qg: Unexpected formatting in '
                      'line: \'%s\'', line)
        else:
            installed.setdefault(group, []).append(pkg)

    # move installed and partially-installed items from available to appropriate other places

    for group in installed:
        if group not in available:
            log.error(
                'Pacman reports group %s installed, but it is not in the '
                'available list (%s)!', group, available
            )
            continue
        if len(installed[group]) == len(available[group]):
            ret['installed'].append(group)
        else:
            ret['partially_installed'].append(group)
        available.pop(group)

    ret['installed'].sort()
    ret['partially_installed'].sort()

    # Now installed and partially installed are set, whatever is left is the available list.
    # In Python 3, .keys() returns an iterable view instead of a list. sort() cannot be
    # called on views. Use sorted() instead. Plus it's just as efficient as sort().
    ret['available'] = sorted(available.keys())

    return ret
894314
def list(self, path=None, with_metadata=False, include_partitions=False):
        ''''''
        l = self.upstream.list(
            path,
            with_metadata=with_metadata,
            include_partitions=include_partitions)

        lp = {}
        for k, v in l.items():
            lp[k.replace('.gz', '')] = v

        return lp
1253133
def list_(runas=None):
    '''
    
    '''
    ret = []
    output = _rbenv_exec(['install', '--list'], runas=runas)
    if output:
        for line in output.splitlines():
            if line == 'Available versions:':
                continue
            ret.append(line.strip())
    return ret
487374
def bridge_list():
    '''
    
    '''
    cmd = 'ovs-vsctl list-br'
    result = __salt__['cmd.run_all'](cmd)
    retcode = result['retcode']
    stdout = result['stdout']
    return _stdout_list_split(retcode, stdout)
129206
def list_pkgs(versions_as_list=False, **kwargs):
    '''
    
    '''
    versions_as_list = salt.utils.data.is_true(versions_as_list)
    # not yet implemented or not applicable
    if any([salt.utils.data.is_true(kwargs.get(x))
            for x in ('removed', 'purge_desired')]):
        return {}

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
            __salt__['pkg_resource.stringify'](ret)
            return ret

    ret = {}
    cmd = '/usr/bin/pkginfo -x'

    # Package information returned two lines per package. On even-offset
    # lines, the package name is in the first column. On odd-offset lines, the
    # package version is in the second column.
    lines = __salt__['cmd.run'](
            cmd,
            output_loglevel='trace',
            python_shell=False).splitlines()
    for index, line in enumerate(lines):
        if index % 2 == 0:
            name = line.split()[0].strip()
        if index % 2 == 1:
            version_num = line.split()[1].strip()
            __salt__['pkg_resource.add_pkg'](ret, name, version_num)

    __salt__['pkg_resource.sort_pkglist'](ret)
    __context__['pkg.list_pkgs'] = copy.deepcopy(ret)
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    return ret
1046949
def dir_list(self, saltenv='base', prefix=''):
        '''
        
        '''
        load = {'saltenv': saltenv,
                'prefix': prefix,
                'cmd': '_dir_list'}
        return salt.utils.data.decode(self.channel.send(load)) if six.PY2 \
            else self.channel.send(load)
35120
def list_():
    '''
    
    '''
    mdata = _check_mdata_list()
    if mdata:
        cmd = '{0}'.format(mdata)
        return __salt__['cmd.run'](cmd, ignore_retcode=True).splitlines()
    return {}
1319509
def list_command(opts)
      usage = "Agent exposes the following commands:\n"
      COMMANDS.reject { |k, _| k == :list || k.to_s =~ /test/ }.each do |c|
        c.each { |k, v| usage += " - #{k.to_s}: #{v}\n" }
      end
      CommandIO.instance.reply(opts[:conn], usage)
    end
368721
function list() {
  return installer.listPlugins(function(listErr, plugins) {
    if (listErr) {
      return out.error("error : %s", listErr);
    }
    if (plugins.length === 0) {
      return out.success("no plugins found");
    }
    var string = "";
    for (var idx = 0; idx < plugins.length; idx++) {
      string += "  " + (idx + 1) + ".  " + plugins[idx].name +
        " - " + plugins[idx].description + "\n";
    }
    return out.success("installed plugins:\n%s", string);
  });
}
739425
def list_(package='', cyg_arch='x86_64'):
    '''
    
    '''
    pkgs = {}
    args = ' '.join(['-c', '-d', package])
    stdout = _cygcheck(args, cyg_arch=cyg_arch)
    lines = []
    if isinstance(stdout, six.string_types):
        lines = salt.utils.stringutils.to_unicode(stdout).splitlines()
    for line in lines:
        match = re.match(r'^([^ ]+) *([^ ]+)', line)
        if match:
            pkg = match.group(1)
            version = match.group(2)
            pkgs[pkg] = version
    return pkgs
1252642
def list_extmods():
    '''
    
    '''
    ret = {}
    ext_dir = os.path.join(__opts__['cachedir'], 'extmods')
    mod_types = os.listdir(ext_dir)
    for mod_type in mod_types:
        ret[mod_type] = set()
        for _, _, files in salt.utils.path.os_walk(os.path.join(ext_dir, mod_type)):
            for fh_ in files:
                ret[mod_type].add(fh_.split('.')[0])
        ret[mod_type] = list(ret[mod_type])
    return ret
568636
def list_tokens(opts):
    '''
    
    '''
    ret = []
    for (dirpath, dirnames, filenames) in salt.utils.path.os_walk(opts['token_dir']):
        for token in filenames:
            ret.append(token)
    return ret
553263
def list_licenses():
    '''
    
    '''
    KEY_PATTERN = re.compile('Key (.*)')

    keys = []
    out = __salt__['cmd.run']('/sbin/emcpreg -list')
    for line in out.splitlines():
        match = KEY_PATTERN.match(line)

        if not match:
            continue

        keys.append({'key': match.group(1)})

    return keys
115210
def list_installed():
    '''
    
    '''
    result = __salt__['pkg.version'](_package_name(), versions_as_list=True)
    if result is None:
        return []

    if six.PY2:
        return sorted(result, cmp=_cmp_version)
    else:
        return sorted(result, key=functools.cmp_to_key(_cmp_version))
160846
def list_(saltenv='base', test=None):
    '''
    
    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__,
            listen=True)

    master_key = salt.utils.master.get_master_key('root', __opts__)

    __jid_event__.fire_event({'key': master_key}, 'salt/reactors/manage/list')

    results = sevent.get_event(wait=30, tag='salt/reactors/manage/list-results')
    reactors = results['reactors']
    return reactors