aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2016-12-15 13:51:57 +0100
committerselias <samelias@cisco.com>2016-12-15 14:36:02 +0100
commit677ae40a2be6db9f49b19ada3c4299a8904f7784 (patch)
tree11d4856989d3930439da9e9244cd751b0fb0ee47 /resources/libraries
parenteafa40a443655df6d286fdabca830ca356ce51af (diff)
HC Test: fix archiving artifacts in csit-hc2vpp jobs
Change-Id: I392eac7404d5e1793a7de9d7a44b9defb89e7b9d Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/honeycomb/HoneycombUtil.py15
-rw-r--r--resources/libraries/robot/honeycomb/honeycomb.robot14
2 files changed, 28 insertions, 1 deletions
diff --git a/resources/libraries/python/honeycomb/HoneycombUtil.py b/resources/libraries/python/honeycomb/HoneycombUtil.py
index 22a7e7ef1e..f607c2439a 100644
--- a/resources/libraries/python/honeycomb/HoneycombUtil.py
+++ b/resources/libraries/python/honeycomb/HoneycombUtil.py
@@ -437,3 +437,18 @@ class HoneycombUtil(object):
(_, stdout, _) = ssh.exec_command(cmd, timeout=30)
return stdout
+
+ @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)
diff --git a/resources/libraries/robot/honeycomb/honeycomb.robot b/resources/libraries/robot/honeycomb/honeycomb.robot
index 8b0a788385..7d807f8df9 100644
--- a/resources/libraries/robot/honeycomb/honeycomb.robot
+++ b/resources/libraries/robot/honeycomb/honeycomb.robot
@@ -89,4 +89,16 @@
| | Stop Honeycomb service on DUTs | ${node}
| | Clear persisted Honeycomb configuration | ${node}
| | Setup DUT | ${node}
-| | Setup Honeycomb service on DUTs | ${node} \ No newline at end of file
+| | Setup Honeycomb service on DUTs | ${node}
+
+| Archive Honeycomb log file
+| | [Documentation] | Copy honeycomb.log file from Honeycomb node\
+| | ... | to test executor.
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Archive Honeycomb log file \| ${nudes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Archive Honeycomb log | ${node} \ No newline at end of file