Run a command on remote hosts. Returns a dict containing results of execution from all hosts. :param cmd: Command to run. Must be shlex quoted. :type cmd: ``str`` :param timeout: Optional Timeout for the command. :type timeout: ``int`` :par
(self, cmd, timeout=None)
| 133 | return results |
| 134 | |
| 135 | def run(self, cmd, timeout=None): |
| 136 | """ |
| 137 | Run a command on remote hosts. Returns a dict containing results |
| 138 | of execution from all hosts. |
| 139 | |
| 140 | :param cmd: Command to run. Must be shlex quoted. |
| 141 | :type cmd: ``str`` |
| 142 | |
| 143 | :param timeout: Optional Timeout for the command. |
| 144 | :type timeout: ``int`` |
| 145 | |
| 146 | :param cwd: Optional Current working directory. Must be shlex quoted. |
| 147 | :type cwd: ``str`` |
| 148 | |
| 149 | :rtype: ``dict`` of ``str`` to ``dict`` |
| 150 | """ |
| 151 | |
| 152 | options = {"cmd": cmd, "timeout": timeout} |
| 153 | results = self._execute_in_pool(self._run_command, **options) |
| 154 | return results |
| 155 | |
| 156 | def put(self, local_path, remote_path, mode=None, mirror_local_mode=False): |
| 157 | """ |