aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-09-25 10:03:32 +0000
committerPeter Mikus <pmikus@cisco.com>2018-09-25 11:19:49 +0000
commit549e949c8e6a9a8bab1c25216b5d5db52eed3c3a (patch)
tree78fcac2d15cee3531db12aa1902f11b8756cb039
parent03481757a5ae21a32d721f7cc7ec2ddef1af6226 (diff)
FIX: Add VatHistory for VATscript files.
Add ability to see Vat history for file sourced commands. Change-Id: I49b19236bec7253ea412659368cb7ccb5f5e3274 Signed-off-by: Peter Mikus <pmikus@cisco.com>
-rw-r--r--resources/libraries/python/VatExecutor.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/resources/libraries/python/VatExecutor.py b/resources/libraries/python/VatExecutor.py
index 30aac2d417..8b9d632836 100644
--- a/resources/libraries/python/VatExecutor.py
+++ b/resources/libraries/python/VatExecutor.py
@@ -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,