Used to make sure the minion is up and responding. Not an ICMP ping. Returns ``True``. CLI Example: .. code-block:: bash salt '*' test.ping
()
| 110 | |
| 111 | |
| 112 | def 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 | |
| 136 | def sleep(length): |