003 File Manager
Current Path:
/usr/local/lib/python3.8/site-packages/salt/runners
usr
/
local
/
lib
/
python3.8
/
site-packages
/
salt
/
runners
/
📁
..
📄
__init__.py
(26 B)
📁
__pycache__
📄
asam.py
(11.2 KB)
📄
auth.py
(1.69 KB)
📄
bgp.py
(17.5 KB)
📄
cache.py
(12.72 KB)
📄
cloud.py
(4.18 KB)
📄
config.py
(913 B)
📄
ddns.py
(8.89 KB)
📄
digicertapi.py
(21.63 KB)
📄
doc.py
(1.39 KB)
📄
drac.py
(5.29 KB)
📄
error.py
(545 B)
📄
event.py
(2.1 KB)
📄
f5.py
(9.58 KB)
📄
fileserver.py
(17.37 KB)
📄
git_pillar.py
(3.98 KB)
📄
http.py
(2.35 KB)
📄
jobs.py
(17.45 KB)
📄
launchd.py
(1.35 KB)
📄
lxc.py
(18.14 KB)
📄
manage.py
(25.84 KB)
📄
mattermost.py
(4.68 KB)
📄
mine.py
(1.68 KB)
📄
nacl.py
(8.15 KB)
📄
net.py
(38.97 KB)
📄
network.py
(2.42 KB)
📄
pagerduty.py
(4.5 KB)
📄
pillar.py
(5.14 KB)
📄
pkg.py
(1.35 KB)
📄
queue.py
(8.88 KB)
📄
reactor.py
(4.97 KB)
📄
salt.py
(4.69 KB)
📄
saltutil.py
(21.5 KB)
📄
sdb.py
(2.14 KB)
📄
smartos_vmadm.py
(11.73 KB)
📄
spacewalk.py
(9.8 KB)
📄
ssh.py
(771 B)
📄
state.py
(8.88 KB)
📄
survey.py
(5.84 KB)
📄
test.py
(1.75 KB)
📄
thin.py
(1.74 KB)
📄
vault.py
(10.09 KB)
📄
venafiapi.py
(6.68 KB)
📄
virt.py
(17.59 KB)
📄
vistara.py
(5.6 KB)
📄
winrepo.py
(8.57 KB)
Editing: test.py
""" This runner is used only for test purposes and servers no production purpose """ import time def arg(*args, **kwargs): """ Output the given args and kwargs Kwargs will be filtered for 'private' keynames. """ kwargs = {k: v for k, v in kwargs.items() if not k.startswith("__")} ret = { "args": args, "kwargs": kwargs, } return ret def raw_arg(*args, **kwargs): """ Output the given args and kwargs """ ret = { "args": args, "kwargs": kwargs, } return ret def metasyntactic(locality="us"): """ Return common metasyntactic variables for the given locality """ lookup = { "us": [ "foo", "bar", "baz", "qux", "quux", "quuz", "corge", "grault", "garply", "waldo", "fred", "plugh", "xyzzy", "thud", ], "uk": ["wibble", "wobble", "wubble", "flob"], } return lookup.get(locality, None) def stdout_print(): """ Print 'foo' and return 'bar' """ print("foo") return "bar" def sleep(s_time=10): """ Sleep t seconds, then return True """ print(s_time) time.sleep(s_time) return True def stream(): """ Return True """ ret = True for i in range(1, 100): __jid_event__.fire_event( {"message": "Runner is {}% done".format(i)}, "progress" ) time.sleep(0.1) return ret def get_opts(): """ .. versionadded:: 2018.3.0 Return the configuration options of the master. CLI Example: .. code-block:: bash salt-run test.get_opts """ return __opts__
Upload File
Create Folder