MCPcopy Create free account
hub / github.com/saltstack/salt / cmd_iter

Method cmd_iter

salt/client/ssh/client.py:136–154  ·  view source on GitHub ↗

Execute a single command via the salt-ssh subsystem and return a generator .. versionadded:: 2015.5.0

(
        self,
        tgt,
        fun,
        arg=(),
        timeout=None,
        tgt_type="glob",
        ret="",
        kwarg=None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

134 return salt.client.ssh.SSH(opts)
135
136 def cmd_iter(
137 self,
138 tgt,
139 fun,
140 arg=(),
141 timeout=None,
142 tgt_type="glob",
143 ret="",
144 kwarg=None,
145 **kwargs,
146 ):
147 """
148 Execute a single command via the salt-ssh subsystem and return a
149 generator
150
151 .. versionadded:: 2015.5.0
152 """
153 ssh = self._prep_ssh(tgt, fun, arg, timeout, tgt_type, kwarg, **kwargs)
154 yield from ssh.run_iter(jid=kwargs.get("jid", None))
155
156 def cmd(
157 self, tgt, fun, arg=(), timeout=None, tgt_type="glob", kwarg=None, **kwargs

Callers 2

cmd_subsetMethod · 0.95
cmd_iterFunction · 0.95

Calls 3

_prep_sshMethod · 0.95
run_iterMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected