aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VatHistory.py
diff options
context:
space:
mode:
authorjan.hradil <jan.hradil@pantheon.tech>2017-04-27 14:47:16 +0200
committerTibor Frank <tifrank@cisco.com>2017-05-02 06:24:18 +0000
commit44cafa8a265cfb1144638430079ef4dbf2501d72 (patch)
treea1eaea31c31578107c9cd11946772c259344010b /resources/libraries/python/VatHistory.py
parent41212b4103c2f1b746d8b2101328e49e8697ef6c (diff)
csit-validate-pylint-master/3731 for build 3731
pylint repairs deleted duplicated method from HcPersistence.py Change-Id: I426e6c15957c995ea10bd11ae2deac75b1cab922 Signed-off-by: jan.hradil <jan.hradil@pantheon.tech>
Diffstat (limited to 'resources/libraries/python/VatHistory.py')
-rw-r--r--resources/libraries/python/VatHistory.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/resources/libraries/python/VatHistory.py b/resources/libraries/python/VatHistory.py
index e46a73771f..e273746f9b 100644
--- a/resources/libraries/python/VatHistory.py
+++ b/resources/libraries/python/VatHistory.py
@@ -17,10 +17,15 @@ from robot.api import logger
from resources.libraries.python.topology import NodeType, DICT__nodes
-__all__ = ["DICT__duts_vat_history", "VatHistory"]
+__all__ = ["DICT__DUTS_VAT_HISTORY", "VatHistory"]
def setup_vat_history(nodes):
+ """Setup VAT history for DUT nodes.
+
+ :param nodes: DUT nodes to setup VAT history for.
+ :type nodes: dict
+ """
duts_vat_history = {}
try:
for node in nodes.values():
@@ -31,7 +36,7 @@ def setup_vat_history(nodes):
# Necessary for the generation of source code documentation.
pass
-DICT__duts_vat_history = setup_vat_history(DICT__nodes)
+DICT__DUTS_VAT_HISTORY = setup_vat_history(DICT__nodes)
class VatHistory(object):
@@ -45,7 +50,7 @@ class VatHistory(object):
:type node: dict
"""
if node['type'] == NodeType.DUT:
- DICT__duts_vat_history[node['host']] = []
+ DICT__DUTS_VAT_HISTORY[node['host']] = []
@staticmethod
def reset_vat_history_on_all_duts(nodes):
@@ -67,9 +72,9 @@ class VatHistory(object):
"""
if node['type'] == NodeType.DUT:
sequence = "\nno VAT command executed"\
- if len(DICT__duts_vat_history[node['host']]) == 0\
+ if len(DICT__DUTS_VAT_HISTORY[node['host']]) == 0\
else "".join("\n{}".format(cmd)
- for cmd in DICT__duts_vat_history[node['host']])
+ for cmd in DICT__DUTS_VAT_HISTORY[node['host']])
logger.trace("{0} VAT command history:{1}\n".
format(node['host'], sequence))
@@ -94,4 +99,4 @@ class VatHistory(object):
:type cmd: str
"""
if node['type'] == NodeType.DUT:
- DICT__duts_vat_history[node['host']].append(cmd)
+ DICT__DUTS_VAT_HISTORY[node['host']].append(cmd)