HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //proc/self/root/usr/lib/python2.7/site-packages/salt/modules/ret.py
# -*- coding: utf-8 -*-
'''
Module to integrate with the returner system and retrieve data sent to a salt returner
'''
from __future__ import absolute_import, unicode_literals, print_function

# Import salt libs
import salt.loader


def get_jid(returner, jid):
    '''
    Return the information for a specified job id

    CLI Example:

    .. code-block:: bash

        salt '*' ret.get_jid redis 20421104181954700505
    '''
    returners = salt.loader.returners(__opts__, __salt__)
    return returners['{0}.get_jid'.format(returner)](jid)


def get_fun(returner, fun):
    '''
    Return info about last time fun was called on each minion

    CLI Example:

    .. code-block:: bash

        salt '*' ret.get_fun mysql network.interfaces
    '''
    returners = salt.loader.returners(__opts__, __salt__)
    return returners['{0}.get_fun'.format(returner)](fun)


def get_jids(returner):
    '''
    Return a list of all job ids

    CLI Example:

    .. code-block:: bash

        salt '*' ret.get_jids mysql
    '''
    returners = salt.loader.returners(__opts__, __salt__)
    return returners['{0}.get_jids'.format(returner)]()


def get_minions(returner):
    '''
    Return a list of all minions

    CLI Example:

    .. code-block:: bash

        salt '*' ret.get_minions mysql
    '''
    returners = salt.loader.returners(__opts__, __salt__)
    return returners['{0}.get_minions'.format(returner)]()