MCPcopy
hub / github.com/saltstack/salt / ping

Function ping

salt/modules/test.py:112–133  ·  view source on GitHub ↗

Used to make sure the minion is up and responding. Not an ICMP ping. Returns ``True``. CLI Example: .. code-block:: bash salt '*' test.ping

()

Source from the content-addressed store, hash-verified

110
111
112def ping():
113 """
114 Used to make sure the minion is up and responding. Not an ICMP ping.
115
116 Returns ``True``.
117
118 CLI Example:
119
120 .. code-block:: bash
121
122 salt '*' test.ping
123 """
124
125 if not salt.utils.platform.is_proxy():
126 log.debug("test.ping received for minion '%s'", __opts__.get("id"))
127 return True
128 else:
129 ping_cmd = __opts__["proxy"]["proxytype"] + ".ping"
130 if __opts__.get("add_proxymodule_to_opts", False):
131 return __opts__["proxymodule"][ping_cmd]()
132 else:
133 return __proxy__[ping_cmd]()
134
135
136def sleep(length):

Callers

nothing calls this directly

Calls 2

debugMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected