[+] send_command_timing

This commit is contained in:
2024-07-24 11:27:03 +03:00
parent 3dce569012
commit 98eca5d805

View File

@@ -326,7 +326,7 @@ class VMKer:
logger.info(f"[{name}] [YML] {n}. Steps: {len(c)}.")
for i, cmd in enumerate(c, 1):
logger.debug(f"executing: {cmd}")
logger.debug(ssh.send_command(cmd))
logger.debug(ssh.send_command_timing(cmd, read_timeout=float(timeout)))
logger.info(f"[{name}] [YML] {n}: {i}/{len(c)}")
else:
y = y.get('after-reboot')
@@ -337,7 +337,7 @@ class VMKer:
for i, cmd in enumerate(c, 1):
logger.debug(f"executing: {cmd}")
logger.info(f"[{name}] < {cmd}")
_ssh_output = ssh.send_command(cmd)
_ssh_output = ssh.send_command_timing(cmd, read_timeout=float(timeout))
logger.debug(_ssh_output)
logger.info(f"[{name}] > {_ssh_output}")
# logger.info(f"[{name}] [YML] {n}: {i}/{len(c)}")
@@ -392,6 +392,7 @@ class VMKer:
logger.info(f"[{_name}] Password for root: {_pwd}")
ssh.send_command(f'echo {_name} > /etc/hostname')
logger.info(f"[{_name}] [YML] Before-Reboot.")
self._execute_yml(_name, ssh)