aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-01-09 16:10:17 +0100
committerPeter Mikus <pmikus@cisco.com>2017-01-10 10:21:04 +0000
commit2671e2616aab7a0bfec7a3501d53ccd72e12d668 (patch)
tree80d2a5f642d413bd0d129421a6dd5aa5731fb4ba /resources/libraries
parent6eda6928faa746c7e012827296f17fc364cde1b3 (diff)
HC Test: Fix log archiving in honeycomb tests
Change-Id: Iad743b3c0e2d1b57e7c6bcae521fe958fbb06ced Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/honeycomb/HoneycombUtil.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/resources/libraries/python/honeycomb/HoneycombUtil.py b/resources/libraries/python/honeycomb/HoneycombUtil.py
index c290af9a6e..a718a242f2 100644
--- a/resources/libraries/python/honeycomb/HoneycombUtil.py
+++ b/resources/libraries/python/honeycomb/HoneycombUtil.py
@@ -27,6 +27,7 @@ from enum import Enum, unique
from robot.api import logger
+from resources.libraries.python.ssh import SSH
from resources.libraries.python.HTTPRequest import HTTPRequest
from resources.libraries.python.constants import Constants as Const
@@ -396,3 +397,18 @@ class HoneycombUtil(object):
base_path = HoneycombUtil.read_path_from_url_file(url_file)
path = base_path + path
return HTTPRequest.delete(node, path)
+
+ @staticmethod
+ def archive_honeycomb_log(node):
+ """Copy honeycomb log file from DUT node to VIRL for archiving.
+
+ :param node: Honeycomb node.
+ :type node: dict
+ """
+
+ ssh = SSH()
+ ssh.connect(node)
+
+ cmd = "cp /var/log/honeycomb/honeycomb.log /scratch/"
+
+ ssh.exec_command_sudo(cmd)