003 File Manager
Current Path:
/usr/local/lib/python3.8/site-packages/salt/thorium
usr
/
local
/
lib
/
python3.8
/
site-packages
/
salt
/
thorium
/
📁
..
📄
__init__.py
(6.11 KB)
📁
__pycache__
📄
calc.py
(5.54 KB)
📄
check.py
(10.61 KB)
📄
file.py
(1.92 KB)
📄
key.py
(2.22 KB)
📄
local.py
(942 B)
📄
reg.py
(4 KB)
📄
runner.py
(908 B)
📄
status.py
(1.03 KB)
📄
timer.py
(829 B)
📄
wheel.py
(551 B)
Editing: runner.py
""" React by calling asynchronous runners """ import salt.runner def cmd(name, func=None, arg=(), **kwargs): """ Execute a runner asynchronous: USAGE: .. code-block:: yaml run_cloud: runner.cmd: - func: cloud.create - arg: - my-ec2-config - myinstance run_cloud: runner.cmd: - func: cloud.create - kwargs: provider: my-ec2-config instances: myinstance """ ret = {"name": name, "changes": {}, "comment": "", "result": True} if func is None: func = name local_opts = {} local_opts.update(__opts__) local_opts["async"] = True # ensure this will be run asynchronous local_opts.update({"fun": func, "arg": arg, "kwarg": kwargs}) runner = salt.runner.Runner(local_opts) runner.run() return ret
Upload File
Create Folder