List currently configured reactors

    CLI Example:

    .. code-block:: bash

        salt-run reactor.list
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
112652
def shell(self, *args, **kwargs):
        
        args = ['shell'] + list(args)
        return self.run_cmd(*args, **kwargs)
990469
def list_available_plugins(runas=None):
    '''
        
        '''
    if runas is None and not salt.utils.platform.is_windows():
        runas = salt.utils.user.get_user()
    cmd = [_get_rabbitmq_plugin(), 'list', '-m']
    ret = __salt__['cmd.run_all'](cmd, reset_system_locale=False, python_shell=False, runas=runas)
    _check_response(ret)
    return _output_to_list(ret['stdout'])
893350
def cmd_list(unused_conf: Config):
    """"""
    for name, builder in sorted(Plugin.builders.items()):
        if builder.func:
            print('+- {0:16s} implemented in {1.__module__}.{1.__name__}()'
                  .format(name, builder.func))
        else:
            print('+- {0:16s} loaded with no builder function'.format(name))
        for hook_name, hook_func in sorted(Plugin.get_hooks_for_builder(name)):
            print('  +- {0} hook implemented in '
                  '{1.__module__}.{1.__name__}()'
                  .format(hook_name, hook_func))
364462
def cmd_list(options):
    
    (i_info, param_str) = gather_data(options)
    if i_info:
        awsc.get_all_aminames(i_info)
        param_str = "Instance List - " + param_str + "\n"
        list_instances(i_info, param_str)
    else:
        print("No instances found with parameters: {}".format(param_str))
314910
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 = 'pkg_info -q -a'
    out = __salt__['cmd.run_stdout'](cmd, output_loglevel='trace')
    for line in out.splitlines():
        try:
            pkgname, pkgver, flavor = __PKG_RE.match(line).groups()
        except AttributeError:
            continue
        pkgname += '--{0}'.format(flavor) if flavor else ''
        __salt__['pkg_resource.add_pkg'](ret, pkgname, pkgver)

    __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
894954
def servermods():
    '''
    
    '''
    cmd = '{0} -l'.format(_detect_os())
    ret = []
    out = __salt__['cmd.run'](cmd).splitlines()
    for line in out:
        if not line:
            continue
        if '.c' in line:
            ret.append(line.strip())
    return ret
1164349
def sr_list(call=None):
    '''
    

    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'This function must be called with -f, --function argument.'
        )
    ret = {}
    session = _get_session()
    srs = session.xenapi.SR.get_all()
    for sr in srs:
        sr_record = session.xenapi.SR.get_record(sr)
        ret[sr_record['name_label']] = sr_record
    return ret
555331
def run_commands(self, commands):
        """"""
        if "eos" in self.profile:
            return list(self.parent.cli(commands).values())[0]
        else:
            raise AttributeError("MockedDriver instance has not attribute '_rpc'")
1313377
def list_env(self, saltenv='base'):
        '''
        
        '''
        load = {'saltenv': saltenv,
                'cmd': '_file_list'}
        return salt.utils.data.decode(self.channel.send(load)) if six.PY2 \
            else self.channel.send(load)
113220
def main(conf):
    
    config = init_config(conf)
    nas_addr = config.get('DEFAULT', 'nas_addr')
    status_file = config.get('DEFAULT', 'statusfile')
    status_dbfile = config.get('DEFAULT', 'statusdb')
    nas_coa_port = config.get('DEFAULT', 'nas_coa_port')

    def do_update_status_task(): 
        d = deferToThread(update_status, status_dbfile, status_file, nas_addr)
        d.addCallback(log.msg,'do_update_status_task done!')
        d.addErrback(log.err)
        reactor.callLater(60.0,do_update_status_task)

    def do_accounting_task(): 
        d = deferToThread(accounting, status_dbfile, config)
        d.addCallback(log.msg,'do_accounting_task done!')
        d.addErrback(log.err)
        reactor.callLater(60.0,do_accounting_task)

    do_update_status_task()
    do_accounting_task()

    coa_protocol = Authorized(config)
    reactor.listenUDP(int(nas_coa_port), coa_protocol, interface='0.0.0.0')
    reactor.run()
1334597
def _run_in_reactor(self, function, _, args, kwargs):
        

        def runs_in_reactor(result, args, kwargs):
            d = maybeDeferred(function, *args, **kwargs)
            result._connect_deferred(d)

        result = EventualResult(None, self._reactor)
        self._registry.register(result)
        self._reactor.callFromThread(runs_in_reactor, result, args, kwargs)
        return result
571532
def salt_call():
    '''
    
    '''
    import salt.cli.call
    if '' in sys.path:
        sys.path.remove('')
    client = salt.cli.call.SaltCall()
    _install_signal_handlers(client)
    client.run()
1183538
def list_policies(vhost="/", runas=None):
    '''
    
    '''
    ret = {}
    if runas is None and not salt.utils.platform.is_windows():
        runas = salt.utils.user.get_user()
    res = __salt__['cmd.run_all'](
        [RABBITMQCTL, 'list_policies', '-q', '-p', vhost],
        reset_system_locale=False,
        runas=runas,
        python_shell=False)
    _check_response(res)
    output = res['stdout']

    if __grains__['os_family'] != 'FreeBSD':
        version = __salt__['pkg.version']('rabbitmq-server').split('-')[0]
    else:
        version = __salt__['pkg.version']('rabbitmq').split('-')[0]

    for line in _output_lines_to_list(output):
        parts = line.split('\t')

        if len(parts) not in (5, 6):
            continue

        vhost, name = parts[0], parts[1]
        if vhost not in ret:
            ret[vhost] = {}
        ret[vhost][name] = {}

        if _LooseVersion(version) >= _LooseVersion("3.7"):
            # in version 3.7 the position of apply_to and pattern has been
            # switched
            ret[vhost][name]['pattern'] = parts[2]
            ret[vhost][name]['apply_to'] = parts[3]
            ret[vhost][name]['definition'] = parts[4]
            ret[vhost][name]['priority'] = parts[5]
        else:
            # How many fields are there? - 'apply_to' was inserted in position
            # 2 at some point
            # and in version 3.7 the position of apply_to and pattern has been
            # switched
            offset = len(parts) - 5
            if len(parts) == 6:
                ret[vhost][name]['apply_to'] = parts[2]
            ret[vhost][name].update({
                'pattern': parts[offset+2],
                'definition': parts[offset+3],
                'priority': parts[offset+4]
            })

    return ret
290521
def list_repos(**kwargs):  # pylint: disable=unused-argument
    '''
    
    '''
    repos = {}
    regex = re.compile(REPO_REGEXP)
    for filename in os.listdir(OPKG_CONFDIR):
        if not filename.endswith(".conf"):
            continue
        with salt.utils.files.fopen(os.path.join(OPKG_CONFDIR, filename)) as conf_file:
            _read_repos(conf_file, repos, filename, regex)
    return repos
1012938
def symlink_list(self, load):
        '''
        
        '''
        if 'env' in load:
            # "env" is not supported; Use "saltenv".
            load.pop('env')

        ret = {}
        if 'saltenv' not in load:
            return {}
        if not isinstance(load['saltenv'], six.string_types):
            load['saltenv'] = six.text_type(load['saltenv'])

        for fsb in self.backends(load.pop('fsbackend', None)):
            symlstr = '{0}.symlink_list'.format(fsb)
            if symlstr in self.servers:
                ret = self.servers[symlstr](load)
        # some *fs do not handle prefix. Ensure it is filtered
        prefix = load.get('prefix', '').strip('/')
        if prefix != '':
            ret = dict([
                (x, y) for x, y in six.iteritems(ret) if x.startswith(prefix)
            ])
        return ret
294369
def cmd_fw_list(self, args):
        ''''''
        stuff = self.filtered_rows_from_args(args)
        if stuff is None:
            return
        (filtered, remainder) = stuff
        print("")
        print(" seq platform frame    major.minor.patch releasetype latest git-sha format")
        for row in filtered:
            print("{seq:>5} {platform:<13} {frame:<10} {version:<10} {releasetype:<9} {latest:<6} {git-sha} {format}".format(**row))