예제 #1
0
 def process_output(self, tgt, stdout, stderr):
     if 'No minions matched the target. No command was sent, no jid was assigned.\n' in stdout:
         stdout = stdout.split('\n', 1)[1:][0]
     stdout, stderr, json_out = SaltCliScriptBase.process_output(
         self, tgt, stdout, stderr)
     if json_out:
         if not isinstance(json_out, dict):
             # A string was most likely loaded, not what we want.
             return stdout, stderr, None
         return stdout, stderr, json_out[tgt]
     return stdout, stderr, json_out
예제 #2
0
 def process_output(self, tgt, stdout, stderr, cli_cmd):  # pylint: disable=signature-differs
     if 'No minions matched the target. No command was sent, no jid was assigned.\n' in stdout:
         stdout = stdout.split('\n', 1)[1:][0]
     old_stdout = None
     if '--show-jid' in cli_cmd and stdout.startswith('jid: '):
         old_stdout = stdout
         stdout = stdout.split('\n', 1)[-1].strip()
     stdout, stderr, json_out = SaltCliScriptBase.process_output(self, tgt, stdout, stderr, cli_cmd)
     if old_stdout is not None:
         stdout = old_stdout
     if json_out:
         if not isinstance(json_out, dict):
             # A string was most likely loaded, not what we want.
             return stdout, stderr, None
         return stdout, stderr, json_out[tgt]
     return stdout, stderr, json_out
예제 #3
0
 def process_output(self, tgt, stdout, stderr):
     stdout, stderr, json_out = SaltCliScriptBase.process_output(
         self, tgt, stdout, stderr)
     if json_out:
         return stdout, stderr, json_out[tgt]
     return stdout, stderr, json_out
예제 #4
0
 def process_output(self, tgt, stdout, stderr):
     if 'No minions matched the target. No command was sent, no jid was assigned.\n' in stdout:
         stdout = stdout.split('\n', 1)[1:][0]
     stdout, stderr, json_out = SaltCliScriptBase.process_output(
         self, tgt, stdout, stderr)
     return stdout, stderr, json_out
예제 #5
0
 def process_output(self, tgt, stdout, stderr, cli_cmd):  # pylint: disable=signature-differs
     stdout, stderr, json_out = SaltCliScriptBase.process_output(self, tgt, stdout, stderr, cli_cmd)
     if json_out:
         return stdout, stderr, json_out[tgt]
     return stdout, stderr, json_out
예제 #6
0
 def process_output(self, tgt, stdout, stderr, cli_cmd):  # pylint: disable=signature-differs
     if 'No minions matched the target. No command was sent, no jid was assigned.\n' in stdout:
         stdout = stdout.split('\n', 1)[1:][0]
     stdout, stderr, json_out = SaltCliScriptBase.process_output(self, tgt, stdout, stderr, cli_cmd)
     return stdout, stderr, json_out