golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/returners
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
5.98 KB
Del
OK
__pycache__
-
Del
OK
appoptics_return.py
6.11 KB
Del
OK
carbon_return.py
8.24 KB
Del
OK
cassandra_cql_return.py
15.14 KB
Del
OK
cassandra_return.py
2.41 KB
Del
OK
couchbase_return.py
8.88 KB
Del
OK
couchdb_return.py
10.35 KB
Del
OK
django_return.py
2.57 KB
Del
OK
elasticsearch_return.py
12.18 KB
Del
OK
etcd_return.py
7.9 KB
Del
OK
highstate_return.py
15.59 KB
Del
OK
influxdb_return.py
8.03 KB
Del
OK
kafka_return.py
2.12 KB
Del
OK
librato_return.py
4.29 KB
Del
OK
local.py
541 B
Del
OK
local_cache.py
17.39 KB
Del
OK
mattermost_returner.py
4.08 KB
Del
OK
memcache_return.py
5.72 KB
Del
OK
mongo_future_return.py
10.01 KB
Del
OK
mongo_return.py
6.06 KB
Del
OK
multi_returner.py
2.82 KB
Del
OK
mysql.py
18.81 KB
Del
OK
nagios_nrdp_return.py
4.92 KB
Del
OK
odbc.py
7.77 KB
Del
OK
pgjsonb.py
17.36 KB
Del
OK
postgres.py
10.33 KB
Del
OK
postgres_local_cache.py
10.82 KB
Del
OK
pushover_returner.py
6.55 KB
Del
OK
rawfile_json.py
2.23 KB
Del
OK
redis_return.py
8.55 KB
Del
OK
sentry_return.py
5.24 KB
Del
OK
slack_returner.py
6.02 KB
Del
OK
slack_webhook_return.py
11.22 KB
Del
OK
sms_return.py
2.64 KB
Del
OK
smtp_return.py
8.2 KB
Del
OK
splunk.py
5.84 KB
Del
OK
sqlite3_return.py
7.73 KB
Del
OK
syslog_return.py
5.26 KB
Del
OK
telegram_return.py
1.92 KB
Del
OK
xmpp_return.py
4.81 KB
Del
OK
zabbix_return.py
2.45 KB
Del
OK
Edit: django_return.py
""" .. deprecated:: 3006.0 .. warning:: This module has been deprecated and will be removed after January 2024. A returner that will inform a Django system that returns are available using Django's signal system. https://docs.djangoproject.com/en/dev/topics/signals/ It is up to the Django developer to register necessary handlers with the signals provided by this returner and process returns as necessary. The easiest way to use signals is to import them from this returner directly and then use a decorator to register them. An example Django module that registers a function called 'returner_callback' with this module's 'returner' function: .. code-block:: python import salt.returners.django_return from django.dispatch import receiver @receiver(salt.returners.django_return, sender=returner) def returner_callback(sender, ret): print('I received {0} from {1}'.format(ret, sender)) """ # Import Python libraries import logging # Import Salt libraries import salt.returners import salt.utils.jid from salt.utils.versions import warn_until_date log = logging.getLogger(__name__) HAS_DJANGO = False try: from django import dispatch # pylint: disable=E0611 HAS_DJANGO = True except ImportError: HAS_DJANGO = False # Define this module's virtual name __virtualname__ = "django" def __virtual__(): warn_until_date( "20240101", "The django returner is broken and deprecated, and will be removed" " after {date}.", ) if not HAS_DJANGO: return False, "Could not import django returner; django is not installed." return True def returner(ret): """ Signal a Django server that a return is available """ signaled = dispatch.Signal(providing_args=["ret"]).send(sender="returner", ret=ret) for signal in signaled: log.debug( "Django returner function 'returner' signaled %s which responded with %s", signal[0], signal[1], ) def save_load(jid, load, minions=None): """ Save the load to the specified jid """ signaled = dispatch.Signal(providing_args=["jid", "load"]).send( sender="save_load", jid=jid, load=load ) for signal in signaled: log.debug( "Django returner function 'save_load' signaled %s which responded with %s", signal[0], signal[1], ) def prep_jid(nocache=False, passed_jid=None): """ Do any work necessary to prepare a JID, including sending a custom ID """ return passed_jid if passed_jid is not None else salt.utils.jid.gen_jid(__opts__)
Save