X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVatExecutor.py;h=de6baababe70478c62bd904388ea3b436a8c433b;hp=841bd0c6cbc1404c05e43de26488dafe6ad8a5c0;hb=6e25bb5e8b8bcc2a1f741892508a68aec7d791b9;hpb=4d2e646f21659a6540312779190b03aed91395d5 diff --git a/resources/libraries/python/VatExecutor.py b/resources/libraries/python/VatExecutor.py index 841bd0c6cb..de6baababe 100644 --- a/resources/libraries/python/VatExecutor.py +++ b/resources/libraries/python/VatExecutor.py @@ -152,6 +152,9 @@ class VatExecutor(object): vat=Constants.VAT_BIN_NAME, input=vat_name) + with open(vat_name, 'r') as tmp_f: + VatHistory.add_to_vat_history(node, tmp_f.read()) + try: (ret_code, stdout, stderr) = ssh.exec_command(cmd, timeout) except SSHTimeout: @@ -197,6 +200,10 @@ class VatExecutor(object): vat=Constants.VAT_BIN_NAME) cmd_input = "exec exec {0}".format(fname) + VatHistory.add_to_vat_history(node, cmd_input) + with open(fname, 'r') as tmp_f: + VatHistory.add_to_vat_history(node, tmp_f.read()) + try: (ret_code, stdout, stderr) = ssh.exec_command_sudo(cmd, cmd_input, timeout) @@ -318,7 +325,7 @@ class VatTerminal(object): 'sudo -S {0}{1}'.format(Constants.VAT_BIN_NAME, json_text), self.__VAT_PROMPT) except Exception: - continue + continue else: break else: