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

Method caller

salt/client/ssh/wrapper/__init__.py:234–258  ·  view source on GitHub ↗

The remote execution function

(*args, **kwargs)

Source from the content-addressed store, hash-verified

232 return self.aliases[cmd]
233
234 def caller(*args, **kwargs):
235 """
236 The remote execution function
237 """
238 argv = [cmd]
239 argv.extend([salt.utils.json.dumps(arg) for arg in args])
240 argv.extend(
241 [
242 "{}={}".format(
243 salt.utils.stringutils.to_str(key), salt.utils.json.dumps(val)
244 )
245 for key, val in kwargs.items()
246 ]
247 )
248 single = salt.client.ssh.Single(
249 self.opts,
250 argv,
251 mods=self.mods,
252 disable_wipe=True,
253 fsclient=self.fsclient,
254 minion_opts=self.minion_opts,
255 **self.kwargs,
256 )
257 stdout, stderr, retcode = single.cmd_block()
258 return parse_ret(stdout, stderr, retcode, result_only=True)
259
260 return caller
261

Callers

nothing calls this directly

Calls 6

cmd_blockMethod · 0.95
parse_retFunction · 0.85
formatMethod · 0.80
extendMethod · 0.45
dumpsMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected