diff options
author | selias <samelias@cisco.com> | 2017-04-18 12:01:27 +0200 |
---|---|---|
committer | Samuel Eliáš <samelias@cisco.com> | 2017-04-20 13:34:59 +0000 |
commit | 76132b51bfe4b2a0813764129f6066c08b4e86f9 (patch) | |
tree | 3577403eafd3b09184a7034b9e1d2a66ccdfdab5 /resources/libraries/python/honeycomb | |
parent | 5f72c7bfd59e5d454f136bad1f7214877dde1c79 (diff) |
HC Test: update persistence suite
- fix "enable persistence" is suite setup
- update Jira links to persistence bug
- log content of persistence file before each restart
Change-Id: I68ad759ded5d6bee277cf946953c11f19628a9e7
Signed-off-by: selias <samelias@cisco.com>
(cherry picked from commit 6a4018c9d8b356bc55af135d68803a08729d0ae1)
Diffstat (limited to 'resources/libraries/python/honeycomb')
-rw-r--r-- | resources/libraries/python/honeycomb/HcPersistence.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/resources/libraries/python/honeycomb/HcPersistence.py b/resources/libraries/python/honeycomb/HcPersistence.py index 83d756f9d3..dae84bdf22 100644 --- a/resources/libraries/python/honeycomb/HcPersistence.py +++ b/resources/libraries/python/honeycomb/HcPersistence.py @@ -142,3 +142,19 @@ class HcPersistence(object): if ret_code != 0: raise HoneycombError("Failed to modify configuration on " "node {0}, {1}".format(node, stderr)) + + @staticmethod + def log_persisted_configuration(node): + """Read contents of Honeycomb persistence files and print to Robot log. + + :param node: Honeycomb node. + :type node: dict + """ + + command = "cat /var/lib/honeycomb/persist/{0}/data.json" + + ssh = SSH() + ssh.connect(node) + + ssh.exec_command_sudo(command.format("config")) + ssh.exec_command_sudo(command.format("context")) |