Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix the TLDK test tcpdump not found issue.
[csit.git]
/
resources
/
libraries
/
python
/
VatHistory.py
diff --git
a/resources/libraries/python/VatHistory.py
b/resources/libraries/python/VatHistory.py
index
e46a737
..
e273746
100644
(file)
--- 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
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):
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():
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
# 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):
class VatHistory(object):
@@
-45,7
+50,7
@@
class VatHistory(object):
:type node: dict
"""
if node['type'] == NodeType.DUT:
: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):
@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 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)
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))
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:
:type cmd: str
"""
if node['type'] == NodeType.DUT:
- DICT__
duts_vat_history
[node['host']].append(cmd)
+ DICT__
DUTS_VAT_HISTORY
[node['host']].append(cmd)