1""" 2A Runner module interface on top of the salt-ssh Python API. 3 4This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. 5""" 6 7 8import salt.client.ssh.client 9 10 11def cmd(tgt, fun, arg=(), timeout=None, tgt_type="glob", kwarg=None): 12 """ 13 .. versionadded:: 2015.5.0 14 .. versionchanged:: 2017.7.0 15 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier 16 releases must use ``expr_form``. 17 18 Execute a single command via the salt-ssh subsystem and return all 19 routines at once 20 21 A wrapper around the :py:meth:`SSHClient.cmd 22 <salt.client.ssh.client.SSHClient.cmd>` method. 23 """ 24 client = salt.client.ssh.client.SSHClient(mopts=__opts__) 25 return client.cmd(tgt, fun, arg, timeout, tgt_type, kwarg) 26