(self, host, cmd, results, timeout=None)
| 299 | results[hostname] = {"message": "Connected to host."} |
| 300 | |
| 301 | def _run_command(self, host, cmd, results, timeout=None): |
| 302 | try: |
| 303 | LOG.debug("Running command: %s on host: %s.", cmd, host) |
| 304 | client = self._hosts_client[host] |
| 305 | (stdout, stderr, exit_code) = client.run( |
| 306 | cmd, timeout=timeout, call_line_handler_func=True |
| 307 | ) |
| 308 | |
| 309 | result = self._handle_command_result( |
| 310 | stdout=stdout, stderr=stderr, exit_code=exit_code |
| 311 | ) |
| 312 | results[host] = result |
| 313 | except Exception as ex: |
| 314 | cmd = self._sanitize_command_string(cmd=cmd) |
| 315 | error = 'Failed executing command "%s" on host "%s"' % (cmd, host) |
| 316 | LOG.exception(error) |
| 317 | results[host] = self._generate_error_result(exc=ex, message=error) |
| 318 | |
| 319 | def _put_files( |
| 320 | self, local_path, remote_path, host, results, mode=None, mirror_local_mode=False |
nothing calls this directly
no test coverage detected