diff options
author | selias <samelias@cisco.com> | 2017-01-09 16:10:17 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2017-01-10 10:21:04 +0000 |
commit | 2671e2616aab7a0bfec7a3501d53ccd72e12d668 (patch) | |
tree | 80d2a5f642d413bd0d129421a6dd5aa5731fb4ba | |
parent | 6eda6928faa746c7e012827296f17fc364cde1b3 (diff) |
HC Test: Fix log archiving in honeycomb tests
Change-Id: Iad743b3c0e2d1b57e7c6bcae521fe958fbb06ced
Signed-off-by: selias <samelias@cisco.com>
-rw-r--r-- | resources/libraries/python/honeycomb/HoneycombUtil.py | 16 |
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) |