FIX: Add VatHistory for VATscript files.
[csit.git] / resources / libraries / python / VatExecutor.py
index 8c3805c..8b9d632 100644 (file)
@@ -106,6 +106,9 @@ class VatExecutor(object):
         if copy_on_execute:
             ssh.scp(vat_name, vat_name)
             remote_file_path = vat_name
+            with open(vat_name, 'r') as vat_file:
+                for line in vat_file:
+                    VatHistory.add_to_vat_history(node, line.replace('\n', ''))
         else:
             remote_file_path = '{0}/{1}/{2}'.format(Constants.REMOTE_FW_DIR,
                                                     Constants.RESOURCES_TPL_VAT,
@@ -201,7 +204,7 @@ class VatTerminal(object):
     """
 
     __VAT_PROMPT = ("vat# ", )
-    __LINUX_PROMPT = (":~$ ", "~]$ ", "~]# ")
+    __LINUX_PROMPT = (":~# ", ":~$ ", "~]$ ", "~]# ")
 
     def __init__(self, node, json_param=True):
         json_text = ' json' if json_param else ''
@@ -345,4 +348,4 @@ class VatTerminal(object):
         for line_tmpl in cmd_template:
             vat_cmd = line_tmpl.format(**args)
             ret.append(self.vat_terminal_exec_cmd(vat_cmd.replace('\n', '')))
-        return ret
\ No newline at end of file
+        return ret