MCPcopy Index your code
hub / github.com/saltstack/salt / cmd_async

Method cmd_async

salt/runner.py:138–156  ·  view source on GitHub ↗

Execute a runner function asynchronously; eauth is respected This function requires that :conf_master:`external_auth` is configured and the user is authorized to execute runner functions: (``@runner``). .. code-block:: python runner.cmd_async({

(self, low)

Source from the content-addressed store, hash-verified

136 return dict(fun=fun, kwarg={"kwarg": kwarg, "arg": arg}, **eauth_creds)
137
138 def cmd_async(self, low):
139 """
140 Execute a runner function asynchronously; eauth is respected
141
142 This function requires that :conf_master:`external_auth` is configured
143 and the user is authorized to execute runner functions: (``@runner``).
144
145 .. code-block:: python
146
147 runner.cmd_async({
148 'fun': 'jobs.list_jobs',
149 'username': 'saltdev',
150 'password': 'saltdev',
151 'eauth': 'pam',
152 })
153 """
154 reformatted_low = self._reformat_low(low)
155
156 return mixins.AsyncClientMixin.cmd_async(self, reformatted_low)
157
158 def cmd_sync(self, low, timeout=None, full_return=False):
159 """

Callers 10

runMethod · 0.45
delete_keyMethod · 0.45
test_queue_load_50Function · 0.45
test_stale_lock_recoveryFunction · 0.45
test_cmd_asyncFunction · 0.45
test_cmd_asyncFunction · 0.45

Calls 1

_reformat_lowMethod · 0.95

Tested by 8

test_queue_load_50Function · 0.36
test_stale_lock_recoveryFunction · 0.36
test_cmd_asyncFunction · 0.36
test_cmd_asyncFunction · 0.36