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

Method _prep_ssh

salt/client/ssh/client.py:118–134  ·  view source on GitHub ↗

Prepare the arguments

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

Source from the content-addressed store, hash-verified

116 return sane_kwargs
117
118 def _prep_ssh(
119 self, tgt, fun, arg=(), timeout=None, tgt_type="glob", kwarg=None, **kwargs
120 ):
121 """
122 Prepare the arguments
123 """
124 kwargs = self.sanitize_kwargs(kwargs)
125 opts = copy.deepcopy(self.opts)
126 opts.update(kwargs)
127 if timeout:
128 opts["timeout"] = timeout
129 arg = salt.utils.args.condition_input(arg, kwarg)
130 opts["argv"] = [fun] + arg
131 opts["selected_target_option"] = tgt_type
132 opts["tgt"] = tgt
133 opts["arg"] = arg
134 return salt.client.ssh.SSH(opts)
135
136 def cmd_iter(
137 self,

Callers 2

cmd_iterMethod · 0.95
cmdMethod · 0.95

Calls 2

sanitize_kwargsMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected